~ubuntu-branches/ubuntu/trusty/puppet/trusty

« back to all changes in this revision

Viewing changes to acceptance/tests/language/resource_refs_with_nested_arrays.rb

  • Committer: Package Import Robot
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2011-10-22 14:08:22 UTC
  • mfrom: (1.1.25) (3.1.32 sid)
  • Revision ID: package-import@ubuntu.com-20111022140822-odxde5lohc45yhuz
Tags: 2.7.6-1
* New upstream release (CVE-2011-3872)
* Remove cherry-picked "groupadd_aix_warning" patch
* Install all new manpages

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
test_name "#7681: Allow using array variables in resource references"
2
 
 
3
 
test_manifest = <<MANIFEST
4
 
$exec_names = ["first", "second"]
5
 
exec { "first":
6
 
  command => "echo the first command",
7
 
  path => "/usr/bin:/bin",
8
 
  logoutput => true,
9
 
}
10
 
exec { "second":
11
 
  command => "echo the second command",
12
 
  path => "/usr/bin:/bin",
13
 
  logoutput => true,
14
 
}
15
 
exec { "third":
16
 
  command => "echo the final command",
17
 
  path => "/usr/bin:/bin",
18
 
  logoutput => true,
19
 
  require => Exec[$exec_names],
20
 
}
21
 
MANIFEST
22
 
 
23
 
results = apply_manifest_on agents, test_manifest
24
 
 
25
 
results.each do |result|
26
 
  assert_match(/Exec\[third\].*the final command/, "#{result.stdout}")
27
 
end