From 163ff6b39120815d52811b20ef5f7f46f2fd950f Mon Sep 17 00:00:00 2001 From: Nick Lewis Date: Thu, 26 May 2011 13:44:23 -0700 Subject: (#7681) Add an acceptance test for resource refs with array variables Paired-with: Jacob Helwig Reviewed-by: Dominic Maraglia --- .../language/resource_refs_with_nested_arrays.rb | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 acceptance/tests/language/resource_refs_with_nested_arrays.rb 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 = < "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 -- cgit