#######################################################
#
# Test that 'cancel' rejects the class-modifier attributes (CFE-4686).
#
# 'cancel' only undefines a class, so the attributes that tune how a class is
# defined or persisted - 'persistence', 'scope', 'timer_policy' - make no sense
# alongside it and must be rejected (rather than silently ignored). The
# sub-policy pairs 'cancel' with each; this test asserts the rejection appears
# in the agent output.
#
#######################################################

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

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

bundle agent init
{
}

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

bundle agent test
{
  meta:
      "description" -> { "CFE-4686" }
        string => "'cancel' must reject 'persistence', 'scope', and 'timer_policy'";
}

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

bundle agent check
{
  methods:
      "" usebundle => dcs_passif_output1(".*'cancel' attribute cannot be combined with.*",
                                         "$(sys.cf_agent) -Kf $(this.promise_filename).sub 2>&1",
                                         $(this.promise_filename));
}
