1body common control 2{ 3 inputs => { "../../default.cf.sub" }; 4 bundlesequence => { default("$(this.promise_filename)") }; 5 version => "1.0"; 6} 7 8bundle agent init 9{ 10 files: 11 "$(G.testdir)/." 12 create => "true"; 13 14 "$(G.testdir)/redmine_7082" 15 create => "true", 16 perms => m("777"), 17 comment => "We first ensure a file exists with specific permissions so 18 that we can test if we get unexpected output when later 19 running with dry-run."; 20} 21 22bundle agent check 23{ 24 vars: 25 "command" string => "$(sys.cf_agent) -Knf $(this.promise_filename).sub -I -b test"; 26 27 methods: 28 # Since the agent is run with dry-run (-n) there should be no statement of permissions changing. 29 # In fact, permissions are not changed, the agent only says they are, so it is only the false statement that needs to be checked. 30 "test_agent_output" 31 usebundle => dcs_passif_output(".*Should change permissions of .* from 0777 to 0700.*", 32 ".*had permissions 0777, changed it to 0700.*", 33 $(command), $(this.promise_filename)); 34 35} 36