From a246d7cbfcf8b83d36022f515785b363004d81e3 Mon Sep 17 00:00:00 2001 From: Luca Sacchi Ricciardi Date: Thu, 9 Apr 2026 12:33:26 +0200 Subject: [PATCH] fix: add cd to lab directory in test-03 for docker compose commands --- labs/lab-01-iam/tests/03-non-root-test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/labs/lab-01-iam/tests/03-non-root-test.sh b/labs/lab-01-iam/tests/03-non-root-test.sh index 2e7f8c3..6551ed6 100755 --- a/labs/lab-01-iam/tests/03-non-root-test.sh +++ b/labs/lab-01-iam/tests/03-non-root-test.sh @@ -101,7 +101,8 @@ test_container_user_configured() { test_no_container_runs_as_root() { # INF-01 requirement: NO container should run as root - local compose_file="$PROJECT_ROOT/labs/lab-01-iam/docker-compose.yml" + cd "$PROJECT_ROOT/labs/lab-01-iam" + local compose_file="docker-compose.yml" if [ ! -f "$compose_file" ]; then echo -e "${YELLOW}SKIP${NC}: docker-compose.yml not created yet"