feat(e2e): add distributed E2E test framework with parametric traffic generation
Add run-e2e-test.sh with CLI parameters (--hits, --http-ratio, --dns, --tls, --src-ips, --keep-analysis, --up) for configurable traffic generation. Traffic runs from VM endpoints with multiple source IPs (alias IPs on eth0) to produce distinct sessions for the ML pipeline. Fix curl TLS flags (--tlsv1.2 instead of --tls-v1-2), skip redundant local verification in distributed mode, and fix dashboard is_available() cache that never retried after ClickHouse recovery. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
28
Makefile
28
Makefile
@ -13,6 +13,7 @@ VERSION ?= $(shell git describe --tags --always 2>/dev/null || echo dev)
|
||||
test-all-stacks test-nginx test-nginx-varnish test-hitch-varnish test-apache \
|
||||
test-matrix \
|
||||
test-vm-nginx test-vm-all vm-up vm-down vm-ssh \
|
||||
e2e-up e2e-down test-e2e test-e2e-quick \
|
||||
reload-prod-logs init-stack import-prod-data init-and-import \
|
||||
purge-db
|
||||
|
||||
@ -60,6 +61,12 @@ help: ## Affiche cette aide
|
||||
@echo " make test-matrix Toutes stacks × el8/el9/el10"
|
||||
@echo " make test-matrix MATRIX_STACKS=nginx,apache MATRIX_DISTROS=el9,el10"
|
||||
@echo ""
|
||||
@echo " Tests E2E distribués (full stack : capture + ML + dashboard)"
|
||||
@echo " make e2e-up Créer les 4 VMs (endpoints + analysis)"
|
||||
@echo " make e2e-down Détruire les VMs E2E"
|
||||
@echo " make test-e2e Test E2E complet"
|
||||
@echo " make test-e2e-quick Test E2E rapide (trafic réduit)"
|
||||
@echo ""
|
||||
@echo " RPM"
|
||||
@echo " make rpm-all Construit tous les RPMs ja4ebpf (el8/el9/el10)"
|
||||
@echo " make rpm-ja4ebpf RPMs ja4ebpf (el8, el9, el10)"
|
||||
@ -275,6 +282,27 @@ test-matrix: ## Toutes stacks × el8 + el9 + el10
|
||||
$${MATRIX_STACKS:+--stacks=$${MATRIX_STACKS}} \
|
||||
$${MATRIX_DISTROS:+--distros=$${MATRIX_DISTROS}}
|
||||
|
||||
# ── Tests E2E distribués (full stack) ──────────────────────────────────────
|
||||
|
||||
E2E_VMS := centos8 rocky9 rocky10 analysis
|
||||
|
||||
e2e-up: ## Créer les 4 VMs pour le test E2E distribué
|
||||
cd $(VM_DIR) && vagrant up $(E2E_VMS)
|
||||
|
||||
e2e-down: ## Détruire les VMs E2E
|
||||
cd $(VM_DIR) && vagrant destroy -f $(E2E_VMS)
|
||||
|
||||
e2e-rsync: ## Synchroniser les fichiers vers toutes les VMs E2E
|
||||
@for vm in $(E2E_VMS); do \
|
||||
cd $(CURDIR)/$(VM_DIR) && vagrant rsync $$vm; \
|
||||
done
|
||||
|
||||
test-e2e: ## Test E2E complet (capture + ML + dashboard)
|
||||
bash tests/vm/run-e2e-test.sh
|
||||
|
||||
test-e2e-quick: ## Test E2E rapide (trafic réduit, 1 cycle bot-detector)
|
||||
TRAFFIC_COUNT=100 bash tests/vm/run-e2e-test.sh
|
||||
|
||||
# ── Base de données ───────────────────────────────────────────────────────────
|
||||
|
||||
reload-prod-logs:
|
||||
|
||||
Reference in New Issue
Block a user