Skip to content

Commit

Permalink
tests/main/component-hooks: check apparmor profile creation/removal
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewphelpsj committed Apr 5, 2024
1 parent 5a03eac commit c43b233
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/main/component-hooks/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,14 @@ execute: |
# the hook writes this file if it runs (and uses the network via the network
# plug) successfully
test -f /var/snap/snap-with-comps/common/install-done
# make sure that security profiles got generated
test -f /var/lib/snapd/apparmor/profiles/snap.snap-with-comps+comp-with-install-hook.hook.install
test -f /var/lib/snapd/seccomp/bpf/snap.snap-with-comps+comp-with-install-hook.hook.install.src
test -f /var/lib/snapd/seccomp/bpf/snap.snap-with-comps+comp-with-install-hook.hook.install.bin
# remove the snap and make sure that the profiles get removed
snap remove snap-with-comps
not test -f /var/lib/snapd/apparmor/profiles/snap.snap-with-comps+comp-with-install-hook.hook.install
not test -f /var/lib/snapd/seccomp/bpf/snap.snap-with-comps+comp-with-install-hook.hook.install.src
not test -f /var/lib/snapd/seccomp/bpf/snap.snap-with-comps+comp-with-install-hook.hook.install.bin

0 comments on commit c43b233

Please sign in to comment.