feat: add README.md to each lab with startup instructions and remove obsolete version from compose files

This commit is contained in:
Luca Sacchi Ricciardi
2026-04-09 14:30:22 +02:00
parent b5ccb3c149
commit 89c8e6ae07
28 changed files with 235 additions and 145 deletions
@@ -9,8 +9,8 @@ files_modified:
- labs/lab-02-network/tests/02-isolation-verification-test.sh
- labs/lab-02-network/tests/03-inf02-compliance-test.sh
- labs/lab-02-network/tests/99-final-verification.sh
- labs/lab-02-network/tests/run-all-tests.sh
- labs/lab-02-network/tests/quick-test.sh
- labs/lab-02-network/tests/99-final-verification.sh
- labs/lab-02-network/tests/99-final-verification.sh
autonomous: true
requirements:
- TEST-01
@@ -22,7 +22,7 @@ user_setup: []
must_haves:
truths:
- "Test scripts exist and validate network infrastructure before implementation"
- "Tests can be executed with single command (run-all-tests.sh)"
- "Tests can be executed with single command (99-final-verification.sh)"
- "Tests verify INF-02 compliance (no 0.0.0.0 port bindings)"
- "Tests validate network isolation between bridge networks"
- "Final verification script provides clear pass/fail report"
@@ -39,10 +39,10 @@ must_haves:
- path: "labs/lab-02-network/tests/99-final-verification.sh"
provides: "Student double-check command"
min_lines: 100
- path: "labs/lab-02-network/tests/run-all-tests.sh"
- path: "labs/lab-02-network/tests/99-final-verification.sh"
provides: "Test orchestration with fail-fast"
min_lines: 50
- path: "labs/lab-02-network/tests/quick-test.sh"
- path: "labs/lab-02-network/tests/99-final-verification.sh"
provides: "Quick validation for development"
min_lines: 30
key_links:
@@ -77,7 +77,7 @@ Output: 6 bash test scripts covering network creation, isolation verification, I
# Test Patterns from Phase 2
From labs/lab-01-iam/tests/run-all-tests.sh:
From labs/lab-01-iam/tests/99-final-verification.sh:
```bash
#!/bin/bash
set -euo pipefail
@@ -90,8 +90,8 @@ NC='\033[0m'
# Test array with fail-fast behavior
declare -a tests=(
"$TEST_DIR/test-01-user-creation.sh"
"$TEST_DIR/test-02-docker-access.sh"
"$TEST_DIR/99-final-verification.sh"
"$TEST_DIR/99-final-verification.sh"
)
# Counter increment helpers to handle set -e
@@ -266,18 +266,18 @@ Phase 2 patterns to follow:
<task type="auto">
<name>Task 5: Create test orchestration scripts</name>
<files>labs/lab-02-network/tests/run-all-tests.sh, labs/lab-02-network/tests/quick-test.sh</files>
<files>labs/lab-02-network/tests/99-final-verification.sh, labs/lab-02-network/tests/99-final-verification.sh</files>
<action>
Create two test orchestration scripts:
1. **run-all-tests.sh**: Full test suite with fail-fast behavior
1. **99-final-verification.sh**: Full test suite with fail-fast behavior
- Runs all test scripts in sequence
- Stops on first failure (fail-fast)
- Shows summary with pass/fail counts
- Recommends final verification if all pass
- Follows Phase 2 pattern from labs/lab-01-iam/tests/run-all-tests.sh
- Follows Phase 2 pattern from labs/lab-01-iam/tests/99-final-verification.sh
2. **quick-test.sh**: Quick validation for development (< 30 seconds)
2. **99-final-verification.sh**: Quick validation for development (< 30 seconds)
- Runs subset of critical tests
- For use during development (per-task validation)
- Tests: network creation, INF-02 compliance, basic isolation
@@ -290,7 +290,7 @@ Phase 2 patterns to follow:
- Test array definition for easy modification
- Counter increments with `|| true` helper
run-all-tests.sh structure:
99-final-verification.sh structure:
```bash
declare -a tests=(
"$TEST_DIR/01-network-creation-test.sh"
@@ -299,7 +299,7 @@ Phase 2 patterns to follow:
)
```
quick-test.sh structure:
99-final-verification.sh structure:
```bash
declare -a tests=(
"$TEST_DIR/01-network-creation-test.sh"
@@ -310,7 +310,7 @@ Phase 2 patterns to follow:
Expected: 2 orchestration scripts enabling both full validation and quick development feedback
</action>
<verify>
<automated>bash labs/lab-02-network/tests/run-all-tests.sh</automated>
<automated>bash labs/lab-02-network/tests/99-final-verification.sh</automated>
</verify>
<done>Orchestration scripts run all tests in sequence. Fail-fast stops on first failure. Quick-test provides rapid feedback during development.</done>
</task>
@@ -324,8 +324,8 @@ After all tasks complete, verify:
1. **Test Files Created**: All 6 test scripts exist in labs/lab-02-network/tests/
2. **Scripts Are Executable**: Run `chmod +x labs/lab-02-network/tests/*.sh`
3. **Tests Run Successfully**: `bash labs/lab-02-network/tests/run-all-tests.sh` executes (tests may show SKIP if infrastructure not created)
4. **Quick Test Works**: `bash labs/lab-02-network/tests/quick-test.sh` completes in < 30 seconds
3. **Tests Run Successfully**: `bash labs/lab-02-network/tests/99-final-verification.sh` executes (tests may show SKIP if infrastructure not created)
4. **Quick Test Works**: `bash labs/lab-02-network/tests/99-final-verification.sh` completes in < 30 seconds
5. **Pattern Consistency**: Tests follow Phase 2 patterns (color output, helper functions, fail-fast)
## Automated Validation Commands
@@ -335,10 +335,10 @@ After all tasks complete, verify:
ls -la labs/lab-02-network/tests/*.sh
# Run full test suite (should execute, may show SKIP)
bash labs/lab-02-network/tests/run-all-tests.sh
bash labs/lab-02-network/tests/99-final-verification.sh
# Run quick test
bash labs/lab-02-network/tests/quick-test.sh
bash labs/lab-02-network/tests/99-final-verification.sh
# Run final verification
bash labs/lab-02-network/tests/99-final-verification.sh
@@ -350,15 +350,15 @@ bash labs/lab-02-network/tests/99-final-verification.sh
- [ ] Tests follow bash best practices (set -euo pipefail, proper exit codes)
- [ ] Color-coded output (PASS=green, FAIL=red, SKIP=yellow)
- [ ] Tests handle missing infrastructure gracefully (SKIP instead of FAIL)
- [ ] run-all-tests.sh implements fail-fast behavior
- [ ] quick-test.sh completes in < 30 seconds
- [ ] 99-final-verification.sh implements fail-fast behavior
- [ ] 99-final-verification.sh completes in < 30 seconds
- [ ] Final verification provides clear student-facing report
</verification>
<success_criteria>
1. Test infrastructure is complete BEFORE implementation (Wave 0 requirement satisfied)
2. All requirement IDs (TEST-01, TEST-05, INF-02, LAB-02) have test coverage
3. Tests can be executed with single command: `bash labs/lab-02-network/tests/run-all-tests.sh`
3. Tests can be executed with single command: `bash labs/lab-02-network/tests/99-final-verification.sh`
4. Tests validate network creation, isolation, and INF-02 compliance
5. Final verification script provides clear pass/fail report for students
6. Quick test enables rapid development feedback (< 30 seconds)