summaryrefslogtreecommitdiffstats
path: root/acceptance
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-05-26 13:44:23 -0700
committerNick Lewis <nick@puppetlabs.com>2011-05-26 14:01:00 -0700
commit4a5e99d95ab80d06abf408c7e8f437fb2e90dc47 (patch)
tree89b40d9eb30a2a2608c06c8ba77dc675cb4464de /acceptance
parentd7ce9226badc3ac07febe2baf14e50ef8a2cc391 (diff)
downloadpuppet-4a5e99d95ab80d06abf408c7e8f437fb2e90dc47.tar.gz
puppet-4a5e99d95ab80d06abf408c7e8f437fb2e90dc47.tar.xz
puppet-4a5e99d95ab80d06abf408c7e8f437fb2e90dc47.zip
(#7681) Add an acceptance test for resource refs with array variables
Paired-with: Jacob Helwig <jacob@puppetlabs.com> Reviewed-by: Dominic Maraglia <dominic@puppetlabs.com>
Diffstat (limited to 'acceptance')
-rw-r--r--acceptance/tests/language/resource_refs_with_nested_arrays.rb27
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