Skip to content

Commit 1bb9dbd

Browse files
zygamaykathm
authored andcommitted
tests: fix prompting test
The prompting test was relying on formerly broken semantics of `owner` prefix rules. This is actually fixed by 4.1.x and so the test was failing, as the files in question were not owned by the test user. Fix this by chowning the directory and the file. Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
1 parent f50f32c commit 1bb9dbd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/main/apparmor-prompting-smoke/task.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,11 @@ execute: |
112112
case "$INTERFACE" in
113113
"home")
114114
mkdir -p "$TARGET_DIR"
115+
chown test:test "$TARGET_DIR"
115116
# create and add text to the target file
116117
TARGET_FILE="$TARGET_DIR/foo"
117118
echo "hello-foo" > "$TARGET_FILE"
119+
chown test:test "$TARGET_FILE"
118120
PERMISSION="read"
119121
# the constraint used in the prompt response
120122
CONSTRAINT="{\"path-pattern\": \"$TARGET_FILE\", \"permissions\": [\"$PERMISSION\"]}"

0 commit comments

Comments
 (0)