######################################################
#
#  Issue 375
#
#####################################################
# This test falls out of the usual test-syntax, because 1) It is designed to
# fail and 2) Two of the set of tests requires a non-standard bundlesequence

body common control
{
      inputs => { "../../default.sub.cf" };
      bundlesequence  => { init, test("...com._"), check };   
      version => "1.0";
}

bundle agent init
{
  files:
      "$(G.testfile)"
      delete => init_delete;
}

body delete init_delete
{
      dirlinks => "delete";
      rmdirs   => "true";
}

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

bundle agent test(val)
{
  guest_environments:
      "host1"
      environment_host => "$(val)",
      classes => whatever("ok");
}

body classes whatever(c)
{
      promise_kept => { "$(c)" };
      promise_repaired => { "$(c)" };
}

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

bundle agent check
{
  reports:
    DEBUG::
      "This test should fail";
    ok::
      "$(this.promise_filename) Pass";
    !ok::
      "$(this.promise_filename) FAIL";
}
