Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

fix(test): silence shellcheck SC2329 on trap-invoked functions

Gabe Kangas9fb011b9aa97
diff --git a/test/automated/activitypub/entrypoint.sh b/test/automated/activitypub/entrypoint.sh
index 8dd3ff5324..9337fa88df 100755
--- a/test/automated/activitypub/entrypoint.sh
+++ b/test/automated/activitypub/entrypoint.sh
@@ -17,6 +17,7 @@ mkcert -cert-file "${CERT_DIR}/cert.pem" \
# invoking user can't remove it. Hand those artifacts back on exit. HOST_UID/
# HOST_GID are set by run.sh; when unset (entrypoint run directly) this is a
# no-op.
+# shellcheck disable=SC2329 # invoked via trap, not called directly
cleanup() {
if [[ -n "${HOST_UID}" && -n "${HOST_GID}" ]]; then
chown -R "${HOST_UID}:${HOST_GID}" /owncast/test/automated/activitypub 2>/dev/null || true
diff --git a/test/automated/activitypub/test-federation.sh b/test/automated/activitypub/test-federation.sh
index 68d1cf005e..4321e6cd8a 100755
--- a/test/automated/activitypub/test-federation.sh
+++ b/test/automated/activitypub/test-federation.sh
@@ -105,6 +105,7 @@ kill_leftover_processes() {
fi
}
+# shellcheck disable=SC2329 # invoked via trap, not called directly
cleanup() {
log_info "Cleaning up..."
diff --git a/test/automated/activitypub/test-follower-validation.sh b/test/automated/activitypub/test-follower-validation.sh
index d24e24cd07..81ca95f967 100755
--- a/test/automated/activitypub/test-follower-validation.sh
+++ b/test/automated/activitypub/test-follower-validation.sh
@@ -40,12 +40,10 @@ OWNCAST_PID=""
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
-YELLOW='\033[1;33m'
CYAN='\033[0;36m'
NC='\033[0m'
log_info() { echo -e "${GREEN}[INFO]${NC} $1"; }
-log_warn() { echo -e "${YELLOW}[WARN]${NC} $1"; }
log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
log_test() { echo -e "${CYAN}[TEST]${NC} $1"; }
@@ -125,6 +123,7 @@ FAKE_ACCOUNTS=(
"https://fictional-fedi.fake/users/notreal2"
)
+# shellcheck disable=SC2329 # invoked via trap, not called directly
cleanup() {
log_info "Cleaning up..."
diff --git a/test/automated/screenshots/run.sh b/test/automated/screenshots/run.sh
index 0fcc6ef675..0de74f4203 100755
--- a/test/automated/screenshots/run.sh
+++ b/test/automated/screenshots/run.sh
@@ -4,6 +4,7 @@ set -e
set -o errexit
set -o pipefail
+# shellcheck disable=SC2329 # invoked via trap, not called directly
finish() {
# shellcheck disable=SC2317
kill_with_kids "$BROWSERSTACK_PID"