######################################################
#
#  Issue 375
#
#####################################################
body common control
{
      inputs => { "../../default.cf.sub" };
      bundlesequence  => { default("$(this.promise_filename)") };   
      version => "1.0";
}

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

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

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

bundle agent test
{
  vars:
      "type" string => "banana";

  files:
      "$(G.testfile)"
      create => "true",
      action => test_action;
}

body action test_action
{
      log_priority => "$(type)";
}

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

bundle agent check
{
  classes:
      "ok" not => fileexists("$(G.testfile)");

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