feat: enhance CrowdSec configuration tests and add new import/export functionality
- Added comprehensive tests for CrowdSec configuration, including preset application and validation error handling. - Introduced new test cases for importing CrowdSec configurations, ensuring backup creation and successful import. - Updated existing tests to reflect changes in UI elements and functionality, including toggling CrowdSec mode and exporting configurations. - Created utility functions for building export filenames and handling downloads, improving code organization and reusability. - Refactored existing tests to use new test IDs and ensure accurate assertions for UI elements and API calls.
This commit is contained in:
20
docs/troubleshooting/crowdsec.md
Normal file
20
docs/troubleshooting/crowdsec.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# CrowdSec Troubleshooting
|
||||
|
||||
Keep Cerberus terminology and the Configuration Packages flow in mind while debugging Hub presets.
|
||||
|
||||
## Quick checks
|
||||
- Cerberus is enabled and you are signed in with admin scope.
|
||||
- `cscli` is available (preferred path); HTTPS CrowdSec Hub endpoints only.
|
||||
- Preset workflow: pull from Hub using cache keys/ETags → preview changes → apply with automatic backup and reload flag.
|
||||
- Offline/curated presets remain available at all times.
|
||||
|
||||
## Common issues
|
||||
- Hub unreachable (503): retry once, then Charon falls back to cached Hub data if available; otherwise stay on curated/offline presets until connectivity returns.
|
||||
- Bad preset slug (400): the slug must match Hub naming; correct the slug before retrying.
|
||||
- Apply failed: review the apply response and restore from the backup that was taken automatically, then retry after fixing the underlying issue.
|
||||
- Apply not supported (501): use curated/offline presets; Hub apply will be re-enabled when supported in your environment.
|
||||
|
||||
## Tips
|
||||
- Keep the CrowdSec Hub reachable over HTTPS; HTTP is blocked.
|
||||
- If you switch to offline mode, clear pending Hub pulls before retrying so cache keys/ETags refresh cleanly.
|
||||
- After restoring from a backup, re-run preview before applying again to verify changes.
|
||||
Reference in New Issue
Block a user