######################################################
#
#  Test of a custom promise with '--simulate' and a module that
#  implements action_policy handling.
#
#####################################################
body common control
{
    inputs => { "../../default.cf.sub" };
    bundlesequence  => { default("$(this.promise_filename)") };
    version => "1.0";
}

#######################################################

bundle agent test
{
  meta:
    "description" -> { "CFE-3433" }
      string => "Test that --simulate can be used with custom promise modules supporting it";
    "test_soft_fail" string => "windows",
      meta => { "ENT-10217" };
}

bundle agent check
{
  vars:
    "command" string => "$(sys.cf_agent) --simulate manifest -D AUTO -KIf $(this.promise_filename).sub";

  methods:
      "check"
        usebundle => dcs_passif_output(".*warning: Should.*", ".*CRITICAL:.*",
                                       $(command), $(this.promise_filename));
}
