# =============================================================================
# Dockerfile.tests — Tests unitaires Go pour ja4ebpf
# (parser TLS, HTTP/2, corrélation — sans dépendance eBPF)
# =============================================================================

FROM rockylinux:9 AS test-builder

RUN dnf install -y epel-release && \
    dnf install -y golang make && \
    dnf clean all

WORKDIR /build

# Copier le workspace Go
COPY services/ja4ebpf/ ./services/ja4ebpf/

WORKDIR /build/services/ja4ebpf

# Exécuter les tests unitaires (sans tag eBPF = skip loader)
RUN GOWORK=off go test -v -count=1 ./internal/parser/... ./internal/correlation/... ./internal/writer/...

