summaryrefslogtreecommitdiffstats
path: root/acceptance/tests/ticket_7101_template_compile.rb
blob: d2ebecd1320632573f3c757e3ae6258f0a52e66d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
test_name "#7101: template compile"

manifest = %q{
$bar = 'test 7101'
file { '/tmp/file_7101.erb':
  content => template('/tmp/template_7101.erb')
}
}


step "Agents: Create template file"
agents.each do |host|
  create_remote_file(host, '/tmp/template_7101.erb', %w{<%= bar %>} )
end

step "Run manifest referencing template file"
apply_manifest_on(agents, manifest)


step "Agents: Verify file is created with correct contents "
agents.each do |host|
  on(host, "cat /tmp/file_7101.erb") do
    assert_match(/test 7101/, stdout, "File /tmp/file_7101.erb not created with correct contents on #{host}" )
  end
end