summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/bin/apk7
-rwxr-xr-xtests/fake_apk_test9
2 files changed, 14 insertions, 2 deletions
diff --git a/tests/bin/apk b/tests/bin/apk
index 29da9ba..8f2a945 100755
--- a/tests/bin/apk
+++ b/tests/bin/apk
@@ -7,15 +7,18 @@ if [ "$1" = "--print-arch" ]; then
exit
fi
-echo "DEBUG: fake apk" "$@"
-
rootfs=.
kver=5.15.78-0
while [ $# -gt 0 ]; do
case "$1" in
add|del)
+ echo "DEBUG: fake apk" "$@"
cmd="$1"
;;
+ audit)
+ echo "U etc/hostname"
+ exit 0
+ ;;
-p|--root)
shift
rootfs="$1"
diff --git a/tests/fake_apk_test b/tests/fake_apk_test
index 84c80ec..8ceba87 100755
--- a/tests/fake_apk_test
+++ b/tests/fake_apk_test
@@ -22,3 +22,12 @@ fake_apk_add_body() {
find
}
+fake_apk_audit_body() {
+ init_env
+ mkdir etc
+ echo "foo" > etc/hostname
+ atf_check -s exit:0 \
+ -o no-match:"DEBUG: fake apk" \
+ -o match:"U etc/hostname" \
+ apk audit
+}