summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--acceptance/tests/ticket_6418_file_recursion_and_audit.rb17
1 files changed, 14 insertions, 3 deletions
diff --git a/acceptance/tests/ticket_6418_file_recursion_and_audit.rb b/acceptance/tests/ticket_6418_file_recursion_and_audit.rb
index f0a55d029..b21e57ddb 100644
--- a/acceptance/tests/ticket_6418_file_recursion_and_audit.rb
+++ b/acceptance/tests/ticket_6418_file_recursion_and_audit.rb
@@ -2,11 +2,9 @@
#
# AffectedVersion: 2.6.0-2.6.5
# FixedVersion:
-#
test_name "#6418: file recursion and audit"
-on agents, "rm -f /var/lib/puppet/state/state.yaml "
manifest = %q{
file { "/tmp/6418": ensure => directory }
file { "/tmp/6418/dir": ensure => directory}
@@ -17,6 +15,19 @@ manifest = %q{
File["/tmp/6418"] -> File["/tmp/6418/dir"] -> File["/tmp/6418/dir/dir"] -> File["/tmp/6418/dir/dir/dir"] -> File["/tmp/6418-copy"]
}
+step "Query agent for statefile"
+agent=agents.first
+on agent, puppet_agent('--configprint statefile')
+statefile=stdout.chomp
+
+step "Remove the statefile on all Agents"
+on agents, "rm -f #{statefile}"
+
step "Apply the manifest"
apply_manifest_on agents, manifest
-on agents, "! grep ensure.*directory /var/lib/puppet/state/state.yaml"
+
+
+step "Verify corecct file recursion and audit state"
+agents.each do |agent|
+ on(agent, "grep ensure.*directory #{statefile}", :acceptable_exit_codes => [ 1 ])
+end