tests: add more integration tests for core tools.

This commit is contained in:
Alexandre Pujol 2024-11-12 21:42:31 +00:00
parent c741f74323
commit 5611001e5b
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
19 changed files with 484 additions and 9 deletions

View file

@ -6,6 +6,9 @@
export BATS_LIB_PATH=${BATS_LIB_PATH:-/usr/lib/bats}
load "$BATS_LIB_PATH/bats-support/load"
# User password for sudo commands
export PASSWORD=${PASSWORD:-user}
export XDG_CACHE_DIR=".cache"
export XDG_CONFIG_DIR=".config"
export XDG_DATA_DIR=".local/share"
@ -100,7 +103,7 @@ aa_check() {
local now duration logs
now=$(date +%s)
duration=$((now - _START + 2))
duration=$((now - _START + 1))
logs=$(aa-log --raw --systemd --since "-${duration}s")
if [[ -n "$logs" ]]; then
fail "profile $PROGRAM raised logs: $logs"