feat(NET-WP-0018-T07): add automated tests for bootstrap UI sections and runbooks

- Created tools/security-bootstrap-console/tests/test_security_bootstrap_console.py (pytest-based, 8 tests covering templates (incl. 0019 dry-run fields), runbook_payloads (T06 entry), audit_core_posture, etc. per layered spec + 0019 note)
- Makefile: added security-bootstrap-console-test (pytest), security-bootstrap-scripts-syntax (bash -n for key sh scripts like dry-run-nonroot-user.sh); integrated into .PHONY and bootstrap lists
- Updated workplan T07 status done + detailed note with pragmatic refs
- Tests pass (python -m pytest)
- Commit + will sync/fix/progress
- Covers console UI, validators, 0019 polish artifacts (orchestrator, cmds, claims, evidence) as required for T07

T07 complete. 6/9 now.
This commit is contained in:
2026-06-03 17:28:21 +02:00
parent c053a7256b
commit e20b322a2e
3 changed files with 116 additions and 2 deletions

View File

@@ -307,7 +307,7 @@ This fulfills "UI guides same sequence as the bootstrap guide and makes wrong-or
```task
id: NET-WP-0018-T07
status: todo
status: done
priority: high
state_hub_task_id: "c412d9e0-a2ca-4849-b6ee-bd4450b5a4a5"
```
@@ -330,6 +330,16 @@ impossible state.
See also `docs/user-engine-netkingdom-integration-assessment.md` for the broader intent/scope fit, gaps (esp. adapters), and recommendations. (The 0019 artifacts -- script, console subcmds, make targets, runbook entry, templates/validators -- are now the concrete implementation to cover with the layered tests in T07.)
**2026-06-03:** Started T07. Using pragmatic tracking. Adding layered tests per spec: Python pytest for console (templates, runbooks incl. dry-run T06, posture validators), shell syntax for scripts, fixture-style for evidence validators. Will create tests/ dir + Makefile target. Include 0019 items as noted.
**2026-06-03:** T07 complete. Added:
- tools/security-bootstrap-console/tests/test_security_bootstrap_console.py (pytest, 8 tests: templates have fields esp. 0019 dry-run, runbook_payloads has T06 entry, audit_core_posture_ready with samples, etc.)
- Makefile: security-bootstrap-console-test (pytest), security-bootstrap-scripts-syntax (bash -n for dry-run, create-user, etc.), added to .PHONY and lists.
- Tests cover console logic for UI sections, runbooks, validators per T07 spec + 0019 note.
- Ran: pytest passes.
- Pragmatic: progress, workplan notes, commit.
This ensures tests would fail if sections disappear/wrong (e.g. no dry-run in runbooks, missing template fields).
### T08 - Integrate Validations Into The UI State Model
```task