1####################################################### 2# 3# Test not 4# 5####################################################### 6 7body common control 8{ 9 inputs => { "../../default.cf.sub" }; 10 bundlesequence => { default("$(this.promise_filename)") }; 11 version => "1.0"; 12} 13 14####################################################### 15 16bundle agent init 17{ 18 vars: 19 "dummy" string => "dummy"; 20} 21 22####################################################### 23 24bundle agent test 25{ 26 files: 27 "/tmp/dont_create_me" 28 create => 'true', 29 classes => classes_generic( "test_files" ), 30 action => warnonly; 31 32 commands: 33 "$(G.echo) 'dont_print_me'" 34 classes => classes_generic( "test_commands" ), 35 action => warnonly; 36 37 processes: 38 "cf-agent-x" 39 restart_class => "restart_cf_agent", 40 classes => classes_generic( "test_processes" ), 41 action => warnonly; 42 43 reports: 44 "Test output" 45 classes => classes_generic("test_reports"), 46 action => warnonly; 47} 48 49body action warnonly 50{ 51 action_policy => "warn"; 52} 53 54####################################################### 55 56bundle agent check 57{ 58 vars: 59 "classes" slist => classesmatching( "test_.*" ); 60 61 classes: 62 "ok" and => { 63 "test_files_not_kept", 64 "test_commands_not_kept", 65 "test_processes_not_kept", 66 "test_reports_not_kept" 67 }; 68 69 reports: 70 ok:: 71 "$(this.promise_filename) Pass"; 72 !ok:: 73 "$(this.promise_filename) FAIL"; 74 75 debug:: 76 "$(classes)"; 77} 78 79