Files
Charon/scripts
GitHub Actions e953053f41 chore(tests): implement Phase 5 TestDataManager auth validation infrastructure
Add cookie domain validation and warning infrastructure for TestDataManager:

Add domain validation to auth.setup.ts after saving storage state
Add mismatch warning to auth-fixtures.ts testData fixture
Document cookie domain requirements in playwright.config.js
Create validate-e2e-auth.sh validation script
Tests remain skipped due to environment configuration requirement:

PLAYWRIGHT_BASE_URL must be http://localhost:8080 for cookie auth
Cookie domain mismatch causes 401/403 on non-localhost URLs
Also skipped flaky keyboard navigation test (documented timing issue).

Files changed:

playwright.config.js (documentation)
auth.setup.ts (validation logic)
auth-fixtures.ts (mismatch warning)
user-management.spec.ts (test skips)
validate-e2e-auth.sh (new validation script)
skipped-tests-remediation.md (status update)
Refs: Phase 5 of skipped-tests-remediation plan
2026-01-24 22:22:40 +00:00
..
2025-12-12 19:21:44 +00:00
2025-12-12 19:21:44 +00:00

Scripts Directory

Running Tests Locally Before Pushing to CI

WAF Integration Test

Always run this locally before pushing WAF-related changes to avoid CI failures:

# From project root
bash ./scripts/coraza_integration.sh

Or use the VS Code task: Ctrl+Shift+PTasks: Run TaskCoraza: Run Integration Script

Requirements:

  • Docker image charon:local must be built first:

    docker build -t charon:local .
    
  • The script will:

    1. Start a test container with WAF enabled
    2. Create a backend container (httpbin)
    3. Test WAF in block mode (expect HTTP 403)
    4. Test WAF in monitor mode (expect HTTP 200)
    5. Clean up all test containers

Expected output:

✓ httpbin backend is ready
✓ Coraza WAF blocked payload as expected (HTTP 403) in BLOCK mode
✓ Coraza WAF in MONITOR mode allowed payload through (HTTP 200) as expected
=== All Coraza integration tests passed ===

Other Test Scripts

  • Security Scan: bash ./scripts/security-scan.sh
  • Go Test Coverage: bash ./scripts/go-test-coverage.sh
  • Frontend Test Coverage: bash ./scripts/frontend-test-coverage.sh

CI/CD Workflows

Changes to these scripts may trigger CI workflows:

  • coraza_integration.sh → WAF Integration Tests workflow
  • Files in .github/workflows/ directory control CI behavior

Tip: Run tests locally to save CI minutes and catch issues faster!