Skip to content

Commit 26718af

Browse files
committed
10_immutable.cf: Use getacls instead of command
Ticket: ENT-10961, CFE-1840 Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
1 parent eb33b89 commit 26718af

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

tests/acceptance/10_files/unsafe/10_immutable.cf

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,29 +67,22 @@ bundle agent test
6767
bundle agent check
6868
{
6969
vars:
70-
"getfacl"
71-
string => ifelse(
72-
fileexists("/var/cfengine/bin/getfacl"), # if
73-
"/var/cfengine/bin/getfacl", # then
74-
"/usr/bin/getfacl" # else
75-
);
76-
7770
"expected"
7871
string => ".*user:root:rwx.*";
79-
"actual"
80-
string => execresult("$(getfacl) $(global.testfile)", "noshell");
72+
"acls"
73+
slist => getacls("$(global.testfile)", "access");
8174

8275
classes:
8376
"ok"
84-
expression => regcmp("$(expected)", "$(actual)");
77+
expression => some("$(expected)", "acls");
8578

8679
reports:
8780
ok::
8881
"$(this.promise_filename) Pass";
8982
!ok::
9083
"$(this.promise_filename) FAIL";
9184
any::
92-
"Expecting output matching '$(expected)', got '$(actual)'";
85+
"Expecting output matching '$(expected)', got '$(acls)'";
9386
}
9487

9588
bundle agent destroy

0 commit comments

Comments
 (0)