Files
Charon/docs/plans/archive/phase_2_test_organization_audit.md
akanealw eec8c28fb3
Some checks failed
Go Benchmark / Performance Regression Check (push) Has been cancelled
Cerberus Integration / Cerberus Security Stack Integration (push) Has been cancelled
Upload Coverage to Codecov / Backend Codecov Upload (push) Has been cancelled
Upload Coverage to Codecov / Frontend Codecov Upload (push) Has been cancelled
CodeQL - Analyze / CodeQL analysis (go) (push) Has been cancelled
CodeQL - Analyze / CodeQL analysis (javascript-typescript) (push) Has been cancelled
CrowdSec Integration / CrowdSec Bouncer Integration (push) Has been cancelled
Docker Build, Publish & Test / build-and-push (push) Has been cancelled
Quality Checks / Auth Route Protection Contract (push) Has been cancelled
Quality Checks / Codecov Trigger/Comment Parity Guard (push) Has been cancelled
Quality Checks / Backend (Go) (push) Has been cancelled
Quality Checks / Frontend (React) (push) Has been cancelled
Rate Limit integration / Rate Limiting Integration (push) Has been cancelled
Security Scan (PR) / Trivy Binary Scan (push) Has been cancelled
Supply Chain Verification (PR) / Verify Supply Chain (push) Has been cancelled
WAF integration / Coraza WAF Integration (push) Has been cancelled
Docker Build, Publish & Test / Security Scan PR Image (push) Has been cancelled
Repo Health Check / Repo health (push) Has been cancelled
History Rewrite Dry-Run / Dry-run preview for history rewrite (push) Has been cancelled
Prune Renovate Branches / prune (push) Has been cancelled
Renovate / renovate (push) Has been cancelled
Nightly Build & Package / sync-development-to-nightly (push) Has been cancelled
Nightly Build & Package / Trigger Nightly Validation Workflows (push) Has been cancelled
Nightly Build & Package / build-and-push-nightly (push) Has been cancelled
Nightly Build & Package / test-nightly-image (push) Has been cancelled
Nightly Build & Package / verify-nightly-supply-chain (push) Has been cancelled
changed perms
2026-04-22 18:19:14 +00:00

4.0 KiB
Executable File

Phase 2 Test Organization Audit

Date: 2026-02-09

Scope

Phase 2 runs with PLAYWRIGHT_SKIP_SECURITY_DEPS=1, so security modules are disabled. This audit flags tests in Phase 2 folders that exercise security UI or security-dependent workflows and should be relocated.

Findings From Phase 2 Failures

No Phase 2 failure messages reference ACL blocks, WAF, rate limiting, or CrowdSec enforcement. The recorded failures are interruption/teardown errors, not security enforcement failures. Security-dependent tests are still present in Phase 2 suites and should be relocated to avoid running with security disabled.

Misorganized Tests (Relocate)

Move to tests/security/ (security UI/config)

  • tests/core/access-lists-crud.spec.ts

    • Tests: Access Lists - CRUD Operations (entire file)
    • Reason: Access lists are a Cerberus security feature; these tests validate security configuration UI and should not run with security disabled.
  • tests/settings/system-settings.spec.ts

    • Tests: should toggle Cerberus security feature, should toggle CrowdSec console enrollment, should persist feature toggle changes, should handle concurrent toggle operations, should retry on 500 Internal Server Error, should fail gracefully after max retries exceeded
    • Reason: These tests explicitly change security feature flags and expect propagation that only makes sense when security is enabled and being exercised.
    • Note: Remaining non-security system settings tests can stay in Phase 2; recommend splitting into a security toggles spec.
  • tests/settings/encryption-management.spec.ts

    • Tests: Encryption Management (entire file)
    • Reason: Encryption management is a security area under /security/encryption and depends on security configuration state.
  • tests/tasks/import-crowdsec.spec.ts

    • Tests: Import CrowdSec Configuration (entire file)
    • Reason: CrowdSec import is a security configuration workflow; it should run with security enabled.
  • tests/monitoring/real-time-logs.spec.ts

    • Tests: Real-Time Logs Viewer (entire file)
    • Reason: The suite explicitly requires Cerberus to render the LiveLogViewer and exercises security-mode log streams and filters.
    • Note: If a future split is desired, only the App Logs mode tests should remain in Phase 2.

Move to tests/security-enforcement/ (blocking/enforcement)

  • None identified in Phase 2 suites.
    • The Phase 2 failures list does not include enforcement messages like ACL blocks, WAF violations, or rate-limit errors.

Phase 2 Tests Likely Failing for Environmental Reasons (Keep)

Relocation Summary

  • Move to tests/security/: 5 files

    • Access Lists CRUD
    • System Settings security toggles (subset of tests)
    • Encryption Management
    • Import CrowdSec
    • Real-Time Logs Viewer
  • Move to tests/security-enforcement/: 0 files

  • Keep in Phase 2 (but investigate interruptions): 3 files

  1. Move Access Lists CRUD to tests/security/.
  2. Split System Settings tests so security toggles move to tests/security/.
  3. Move Encryption Management to tests/security/.
  4. Move Import CrowdSec to tests/security/.
  5. Move Real-Time Logs Viewer to tests/security/ (or split to keep App Logs only in Phase 2).