1#######################################################
2#
3# ENT-5886 -- -N/--negate should prevent persistent classes from being defined
4#
5#######################################################
6
7body common control
8{
9      inputs => { "../../default.cf.sub" };
10      bundlesequence  => { default("$(this.promise_filename)") };
11      version => "1.0";
12}
13
14bundle agent init
15{
16  vars:
17      "dflags" string => ifelse("EXTRA", "-DDEBUG,EXTRA", "-DDEBUG");
18}
19
20bundle agent test
21{
22  meta:
23      "description" -> {"ENT-5886"}
24        string => "-N/--negate should prevent persistent classes from being defined";
25
26  commands:
27      "$(sys.cf_agent) -K $(init.dflags) -f $(this.promise_filename).sub"
28        classes => test_always("done_persisting");
29}
30
31body classes test_always(x)
32{
33    promise_repaired => { "$(x)" };
34    promise_kept => { "$(x)" };
35    repair_failed => { "$(x)" };
36    repair_denied => { "$(x)" };
37    repair_timeout => { "$(x)" };
38}
39
40bundle agent check
41{
42  vars:
43    done_persisting::
44      "subout" string => execresult("$(sys.cf_agent) -N test_class -K $(init.dflags) -f $(this.promise_filename).sub2", "noshell");
45
46  methods:
47      "" usebundle => dcs_check_strcmp($(subout), "R: Pass",
48                                       $(this.promise_filename),
49                                       "no");
50}
51