Files
Charon/docs/reports/qa_report.md
T
GitHub Actions a3237fe32c feat: add integration tests for CrowdSec preset pull and apply
- Introduced `crowdsec_integration_test.go` to validate the integration of the CrowdSec preset pull and apply functionality.
- Updated `RealCommandExecutor` to return combined output for command execution.
- Enhanced `CrowdsecHandler` to map errors to appropriate HTTP status codes, including handling timeouts.
- Added tests for timeout scenarios in `crowdsec_presets_handler_test.go`.
- Improved `HubService` to support configurable pull and apply timeouts via environment variables.
- Implemented fallback logic for fetching hub index from a default URL if the primary fails.
- Updated documentation to reflect changes in preset handling and cscli availability.
- Refactored frontend tests to utilize a new test query client for better state management.
- Added a new integration script `crowdsec_integration.sh` for automated testing of the CrowdSec integration.
2025-12-09 00:29:40 +00:00

2.9 KiB

QA Report: CrowdSec Hub/Preset Network-Error Fix (feature/beta-release)

Date: December 8, 2025 - 21:26 UTC QA Agent: QA_Automation Scope: Regression after CrowdSec hub/preset network-error fix on feature/beta-release. Requested Steps: pre-commit run --all-files, cd backend && go test ./..., cd frontend && npm run test:ci.

Executive Summary

Final Verdict: PASS (all commands green; coverage gate met)

  • pre-commit run --all-files PASSED — Hooks completed; coverage gate at 85.1% (≥ 85%).
  • cd backend && go test ./... PASSED — All packages succeeded.
  • cd frontend && npm run test:ci PASSED — 70 files / 598 tests passed; one non-blocking warning about undefined query data in Layout feature-flags test.

Test Results

Area Command Status Details
Pre-commit Hooks pre-commit run --all-files PASS Coverage 85.1% (min 85%), Go Vet, .version check, TS check, frontend lint all passed
Backend Tests cd backend && go test ./... PASS All packages passed (services, util, version, handlers, middleware)
Frontend Tests cd frontend && npm run test:ci PASS 70 files / 598 tests passed; duration ~46s; warning: React Query "query data cannot be undefined" for feature-flags in Layout.test

Detailed Results

Pre-commit (All Files)

  • Status: Passed
  • Coverage Gate: 85.1% (requirement 85%)
  • Hooks: Go Vet, version tag check, Frontend TypeScript check, Frontend Lint (Fix)

Backend Tests

  • Status: Passed
  • Notes: go test ./... completed without failures; packages include services, util, version, handlers, middleware.

Frontend Tests

  • Status: Passed
  • Totals: 70 files; 598 tests; duration ~46s.
  • Warnings (non-blocking): React Query "query data cannot be undefined" for feature-flags in Layout.test.tsx; jsdom "navigation to another Document" informational notices.

Evidence

Pre-commit Output (excerpt)

Computed coverage: 85.1% (minimum required 85%)
Coverage requirement met
Go Vet...................................................................Passed
Check .version matches latest Git tag....................................Passed
Frontend TypeScript Check................................................Passed
Frontend Lint (Fix)......................................................Passed

Frontend Tests (vitest)

Test Files  70 passed (70)
Tests      598 passed (598)
Duration    46.45s
Warning     Query data cannot be undefined. Affected query key: ["feature-flags"]

Follow-ups / Recommendations

  1. Silence React Query warning: Provide default fixtures/mocks for feature-flags query in Layout.test.tsx to avoid undefined data warning.
  2. Keep coverage gate ≥ 85%: Current computed coverage 85.1%.

Status: QA PASS — All requested commands succeeded; coverage gate met at 85.1%