Skip to content

Commit 460dc02

Browse files
committed
fix(tests): remove duplicate script stub appended to lab test files
1 parent 44d7843 commit 460dc02

1 file changed

Lines changed: 1 addition & 68 deletions

File tree

tests/labs/test-lab-20-06.sh

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -182,71 +182,4 @@ echo -e "${CYAN}======================================${NC}"
182182

183183
if [ "${FAIL}" -gt 0 ]; then
184184
exit 1
185-
fi
186-
set -euo pipefail
187-
188-
LAB_ID="20-06"
189-
LAB_NAME="Production Deployment"
190-
MODULE="graylog"
191-
COMPOSE_FILE="docker/docker-compose.production.yml"
192-
PASS=0
193-
FAIL=0
194-
195-
# ── Colors ────────────────────────────────────────────────────────────────────
196-
RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'
197-
CYAN='\033[0;36m'; NC='\033[0m'
198-
199-
pass() { echo -e "${GREEN}[PASS]${NC} $1"; ((PASS++)); }
200-
fail() { echo -e "${RED}[FAIL]${NC} $1"; ((FAIL++)); }
201-
info() { echo -e "${CYAN}[INFO]${NC} $1"; }
202-
warn() { echo -e "${YELLOW}[WARN]${NC} $1"; }
203-
204-
echo -e "${CYAN}======================================${NC}"
205-
echo -e "${CYAN} Lab ${LAB_ID}: ${LAB_NAME}${NC}"
206-
echo -e "${CYAN} Module: ${MODULE}${NC}"
207-
echo -e "${CYAN}======================================${NC}"
208-
echo ""
209-
210-
# ── PHASE 1: Setup ────────────────────────────────────────────────────────────
211-
info "Phase 1: Setup"
212-
docker compose -f "${COMPOSE_FILE}" up -d
213-
info "Waiting 30s for ${MODULE} to initialize..."
214-
sleep 30
215-
216-
# ── PHASE 2: Health Checks ────────────────────────────────────────────────────
217-
info "Phase 2: Health Checks"
218-
219-
if docker compose -f "${COMPOSE_FILE}" ps | grep -q "running\|Up"; then
220-
pass "Container is running"
221-
else
222-
fail "Container is not running"
223-
fi
224-
225-
# ── PHASE 3: Functional Tests ─────────────────────────────────────────────────
226-
info "Phase 3: Functional Tests (Lab 06 — Production Deployment)"
227-
228-
# TODO: Add module-specific functional tests here
229-
# Example:
230-
# if curl -sf http://localhost:9000/health > /dev/null 2>&1; then
231-
# pass "Health endpoint responds"
232-
# else
233-
# fail "Health endpoint not reachable"
234-
# fi
235-
236-
warn "Functional tests for Lab 20-06 pending implementation"
237-
238-
# ── PHASE 4: Cleanup ──────────────────────────────────────────────────────────
239-
info "Phase 4: Cleanup"
240-
docker compose -f "${COMPOSE_FILE}" down -v --remove-orphans
241-
info "Cleanup complete"
242-
243-
# ── Results ───────────────────────────────────────────────────────────────────
244-
echo ""
245-
echo -e "${CYAN}======================================${NC}"
246-
echo -e " Lab ${LAB_ID} Complete"
247-
echo -e " ${GREEN}PASS: ${PASS}${NC} | ${RED}FAIL: ${FAIL}${NC}"
248-
echo -e "${CYAN}======================================${NC}"
249-
250-
if [ "${FAIL}" -gt 0 ]; then
251-
exit 1
252-
fi
185+
fi

0 commit comments

Comments
 (0)