1bundle common test_meta
2{
3  vars:
4      "description" string => "A user present gets locked (dry run)";
5      "story_id" string => "5525";
6      "covers" string => "dryrun_repaired";
7}
8
9#######################################################
10
11body common control
12{
13      inputs => { "../../default.cf.sub", "user_queries.cf.sub" };
14      bundlesequence  => { default("$(this.promise_filename)") };
15}
16
17#######################################################
18
19bundle common hpux_trusted
20{
21  classes:
22      "hpux_trusted_mode_test"
23        expression => regcmp(".*hpux_trusted.*", $(this.promise_filename));
24}
25
26bundle agent init
27{
28  meta:
29      "test_skip_unsupported" string => "hpux_trusted_mode_test.!hpux";
30
31  users:
32    "johndoe"
33      policy => "present";
34}
35
36#######################################################
37
38bundle agent test
39{
40  users:
41    "johndoe"
42      action => test_action,
43      policy => "locked";
44}
45
46body action test_action
47{
48  action_policy => "warn";
49}
50
51#######################################################
52
53bundle agent check
54{
55  methods:
56    "any" usebundle => user_is_unlocked("johndoe", "success", "failure"),
57      classes => always("methods_run");
58
59  classes:
60      "ready" expression => "methods_run";
61      "ok" and => { "success", "!failure" };
62
63  reports:
64    ok.ready::
65      "$(this.promise_filename) Pass";
66    !ok.ready::
67      "$(this.promise_filename) FAIL";
68}
69