Skip to content

Commit 8eb5887

Browse files
committed
See ticket for info
Ticket: ENT-13535 Signed-off-by: Lars Erik Wik <[email protected]>
1 parent 6db4861 commit 8eb5887

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
##############################################################################
2+
#
3+
# See ticket ENT-13535 for info.
4+
#
5+
##############################################################################
6+
7+
body common control
8+
{
9+
bundlesequence => { "init", "test", "check", "clean" };
10+
}
11+
12+
body delete tidy
13+
{
14+
dirlinks => "delete";
15+
rmdirs => "true";
16+
}
17+
18+
##############################################################################
19+
20+
bundle agent init
21+
{
22+
users:
23+
"test_user"
24+
policy => "absent";
25+
26+
files:
27+
"/tmp/some-random-file.txt"
28+
delete => tidy;
29+
}
30+
31+
##############################################################################
32+
33+
bundle agent test
34+
{
35+
meta:
36+
"description" -> { "ENT-13535" }
37+
string => "See ticket ENT-13535 for info";
38+
"test_skip_unsupported"
39+
string => "windows",
40+
comment => "Not applicable for Windows since it uses a C API";
41+
42+
users:
43+
linux::
44+
"test_user; echo 'Hello CFEngine' > /tmp/some-random-file.txt"
45+
policy => "present";
46+
}
47+
48+
##############################################################################
49+
50+
bundle agent check
51+
{
52+
reports:
53+
"$(this.promise_filename) $(with)"
54+
with => ifelse(fileexists("/tmp/some-random-file.txt"), "FAIL", "Pass");
55+
}
56+
57+
bundle agent clean
58+
{
59+
methods:
60+
"init";
61+
}

0 commit comments

Comments
 (0)