diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2011-05-26 14:01:33 -0700 |
|---|---|---|
| committer | Nick Lewis <nick@puppetlabs.com> | 2011-05-26 14:01:33 -0700 |
| commit | 6a002894d3fb5fc59cae92fc4e4ae510e1e584e9 (patch) | |
| tree | 89b40d9eb30a2a2608c06c8ba77dc675cb4464de | |
| parent | d7ce9226badc3ac07febe2baf14e50ef8a2cc391 (diff) | |
| parent | 4a5e99d95ab80d06abf408c7e8f437fb2e90dc47 (diff) | |
| download | puppet-6a002894d3fb5fc59cae92fc4e4ae510e1e584e9.tar.gz puppet-6a002894d3fb5fc59cae92fc4e4ae510e1e584e9.tar.xz puppet-6a002894d3fb5fc59cae92fc4e4ae510e1e584e9.zip | |
Merge branch 'ticket/2.6.x/7681' into 2.6.x
| -rw-r--r-- | acceptance/tests/language/resource_refs_with_nested_arrays.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/acceptance/tests/language/resource_refs_with_nested_arrays.rb b/acceptance/tests/language/resource_refs_with_nested_arrays.rb new file mode 100644 index 000000000..7bc797885 --- /dev/null +++ b/acceptance/tests/language/resource_refs_with_nested_arrays.rb @@ -0,0 +1,27 @@ +test_name "#7681: Allow using array variables in resource references" + +test_manifest = <<MANIFEST +$exec_names = ["first", "second"] +exec { "first": + command => "echo the first command", + path => "/usr/bin:/bin", + logoutput => true, +} +exec { "second": + command => "echo the second command", + path => "/usr/bin:/bin", + logoutput => true, +} +exec { "third": + command => "echo the final command", + path => "/usr/bin:/bin", + logoutput => true, + require => Exec[$exec_names], +} +MANIFEST + +results = apply_manifest_on agents, test_manifest + +results.each do |result| + assert_match(/Exec\[third\].*the final command/, "#{result.stdout}") +end |
