File tree Expand file tree Collapse file tree 1 file changed +61
-0
lines changed
tests/acceptance/17_users/unsafe Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments