#######################################################
#
# Test simple storage promises - free space in range
#
#######################################################
body common control
{
  inputs => { "../../default.sub.cf" };
  bundlesequence => { default("$(this.promise_filename)") };
  version => "1.0";
}

#######################################################
bundle agent init
{
  vars:
    "dummy" string => "dummy";
}

#######################################################
bundle agent test
{
  meta:
    "test_soft_fail"
      string => "sunos_5_11|sunos_5_10",
      meta => { "redmine5234" };

  vars:
    windows::
      "path" string => "C:\\";

    !windows::
      "path" string => "/var";

  storage:
    "$(path)"
      volume => test_volume,
      classes => test_set_class("pass", "fail");
}

body volume test_volume
{
  freespace => "1k";
}

body classes test_set_class(ok_class, notok_class)
{
  promise_kept => { "$(ok_class)" };
  promise_repaired => { "$(ok_class)" };
  repair_failed => { "$(notok_class)" };
}

#######################################################
bundle agent check
{
  classes:
    "ok" expression => "pass.!fail";

  reports:
    ok::
      "$(this.promise_filename) Pass";

    !ok::
      "$(this.promise_filename) FAIL";
}

### PROJECT_ID: core
### CATEGORY_ID: 31
