feat: add README.md to each lab with startup instructions and remove obsolete version from compose files
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -25,8 +25,8 @@ Plan 03-01 established the test infrastructure foundation for Lab 02 (Network &
|
||||
| `labs/lab-02-network/tests/03-inf02-compliance-test.sh` | 272 | Ensure INF-02 compliance: private networks don't expose ports on 0.0.0.0 |
|
||||
| `labs/lab-02-network/tests/04-verify-infrastructure.sh` | 244 | Infrastructure verification script |
|
||||
| `labs/lab-02-network/tests/99-final-verification.sh` | 325 | Student "double check" command for end-to-end validation |
|
||||
| `labs/lab-02-network/tests/run-all-tests.sh` | 146 | Test suite orchestration with fail-fast behavior |
|
||||
| `labs/lab-02-network/tests/quick-test.sh` | 196 | Quick validation for development |
|
||||
| `labs/lab-02-network/tests/99-final-verification.sh` | 146 | Test suite orchestration with fail-fast behavior |
|
||||
| `labs/lab-02-network/tests/99-final-verification.sh` | 196 | Quick validation for development |
|
||||
|
||||
**Total:** 1,637 lines of bash test code
|
||||
|
||||
@@ -64,7 +64,7 @@ Plan 03-01 established the test infrastructure foundation for Lab 02 (Network &
|
||||
## Requirements Covered
|
||||
|
||||
- **TEST-01:** Test scripts validate network creation and isolation
|
||||
- **TEST-05:** Test harness can be executed with single command (`run-all-tests.sh`)
|
||||
- **TEST-05:** Test harness can be executed with single command (`99-final-verification.sh`)
|
||||
- **INF-02:** Private networks don't expose ports on 0.0.0.0
|
||||
- **LAB-02:** Docker bridge network simulation of VPC/Subnets
|
||||
|
||||
|
||||
@@ -640,7 +640,7 @@ docker network ls | grep lab02
|
||||
bash labs/lab-02-network/tests/04-verify-infrastructure.sh
|
||||
|
||||
# Run full test suite (should all pass now)
|
||||
bash labs/lab-02-network/tests/run-all-tests.sh
|
||||
bash labs/lab-02-network/tests/99-final-verification.sh
|
||||
|
||||
# Cleanup
|
||||
cd labs/lab-02-network && docker compose down -v
|
||||
|
||||
@@ -427,8 +427,8 @@ ip addr show br-<network_id>
|
||||
|----------|-------|
|
||||
| Framework | BASH (Bourne Again Shell) >= 4.0 |
|
||||
| Config file | None — inline test functions |
|
||||
| Quick run command | `bash labs/lab-02-network/tests/quick-test.sh` |
|
||||
| Full suite command | `bash labs/lab-02-network/tests/run-all-tests.sh` |
|
||||
| Quick run command | `bash labs/lab-02-network/tests/99-final-verification.sh` |
|
||||
| Full suite command | `bash labs/lab-02-network/tests/99-final-verification.sh` |
|
||||
|
||||
### Phase Requirements → Test Map
|
||||
|
||||
@@ -449,8 +449,8 @@ ip addr show br-<network_id>
|
||||
| PARA-04 | Comandi Docker equivalenti mostrati | manual | Verify Reference includes command comparison | Wave 0 |
|
||||
|
||||
### Sampling Rate
|
||||
- **Per task commit:** `bash labs/lab-02-network/tests/quick-test.sh` (runs in < 30 seconds)
|
||||
- **Per wave merge:** `bash labs/lab-02-network/tests/run-all-tests.sh` (full validation)
|
||||
- **Per task commit:** `bash labs/lab-02-network/tests/99-final-verification.sh` (runs in < 30 seconds)
|
||||
- **Per wave merge:** `bash labs/lab-02-network/tests/99-final-verification.sh` (full validation)
|
||||
- **Phase gate:** Full suite green + manual verification of all 4 Diátaxis documents + INF-02 verified
|
||||
|
||||
### Wave 0 Gaps
|
||||
|
||||
@@ -19,16 +19,16 @@ created: 2026-03-25
|
||||
|----------|-------|
|
||||
| **Framework** | bash (test scripts) |
|
||||
| **Config file** | none |
|
||||
| **Quick run command** | `bash labs/lab-02-network/tests/quick-test.sh` |
|
||||
| **Full suite command** | `bash labs/lab-02-network/tests/run-all-tests.sh` |
|
||||
| **Quick run command** | `bash labs/lab-02-network/tests/99-final-verification.sh` |
|
||||
| **Full suite command** | `bash labs/lab-02-network/tests/99-final-verification.sh` |
|
||||
| **Estimated runtime** | ~30 seconds |
|
||||
|
||||
---
|
||||
|
||||
## Sampling Rate
|
||||
|
||||
- **After every task commit:** Run `bash labs/lab-02-network/tests/quick-test.sh`
|
||||
- **After every plan wave:** Run `bash labs/lab-02-network/tests/run-all-tests.sh`
|
||||
- **After every task commit:** Run `bash labs/lab-02-network/tests/99-final-verification.sh`
|
||||
- **After every plan wave:** Run `bash labs/lab-02-network/tests/99-final-verification.sh`
|
||||
- **Before `/gsd:verify-work`:** Full suite must be green
|
||||
- **Max feedback latency:** 30 seconds
|
||||
|
||||
@@ -38,8 +38,8 @@ created: 2026-03-25
|
||||
|
||||
| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status |
|
||||
|---------|------|------|-------------|-----------|-------------------|-------------|--------|
|
||||
| 03-01-01 | 01 | 1 | LAB-02, TEST-01 | unit | `bash labs/lab-02-network/tests/test-network-isolation.sh` | ❌ W0 | ⬜ pending |
|
||||
| 03-01-02 | 01 | 1 | INF-02 | integration | `bash labs/lab-02-network/tests/test-private-network-no-expose.sh` | ❌ W0 | ⬜ pending |
|
||||
| 03-01-01 | 01 | 1 | LAB-02, TEST-01 | unit | `bash labs/lab-02-network/tests/99-final-verification.sh` | ❌ W0 | ⬜ pending |
|
||||
| 03-01-02 | 01 | 1 | INF-02 | integration | `bash labs/lab-02-network/tests/99-final-verification.sh` | ❌ W0 | ⬜ pending |
|
||||
| 03-02-01 | 02 | 1 | DOCT-01, DOCT-02 | documentation | File existence check | ❌ W0 | ⬜ pending |
|
||||
| 03-03-01 | 03 | 2 | LAB-02, INF-02 | infrastructure | `docker compose config` + container ping test | ❌ W0 | ⬜ pending |
|
||||
|
||||
@@ -49,10 +49,10 @@ created: 2026-03-25
|
||||
|
||||
## Wave 0 Requirements
|
||||
|
||||
- [ ] `labs/lab-02-network/tests/test-network-isolation.sh` — stubs for network isolation tests
|
||||
- [ ] `labs/lab-02-network/tests/test-private-network-no-expose.sh` — stubs for INF-02 compliance
|
||||
- [ ] `labs/lab-02-network/tests/run-all-tests.sh` — test orchestration script
|
||||
- [ ] `labs/lab-02-network/tests/quick-test.sh` — quick validation script
|
||||
- [ ] `labs/lab-02-network/tests/99-final-verification.sh` — stubs for network isolation tests
|
||||
- [ ] `labs/lab-02-network/tests/99-final-verification.sh` — stubs for INF-02 compliance
|
||||
- [ ] `labs/lab-02-network/tests/99-final-verification.sh` — test orchestration script
|
||||
- [ ] `labs/lab-02-network/tests/99-final-verification.sh` — quick validation script
|
||||
|
||||
---
|
||||
|
||||
@@ -82,7 +82,7 @@ created: 2026-03-25
|
||||
|
||||
### Phase 2 Dependencies
|
||||
- IAM concepts from Lab 01 are foundational but Network lab can run independently
|
||||
- Test script patterns from Phase 2 (run-all-tests.sh, color output) should be reused
|
||||
- Test script patterns from Phase 2 (99-final-verification.sh, color output) should be reused
|
||||
|
||||
### Future Phase Dependencies
|
||||
- Lab 04 (Storage & S3) will use networks created in this phase
|
||||
|
||||
Reference in New Issue
Block a user