test(identity): add isolated browser mail fixture

This commit is contained in:
TakuyaYagam1 committed 2026-10-07 11:52:38 +03:00
1 parent 86f562f5b6
commit 24638d46d2
20 files changed
+885 -20

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
# The fixture is built separately from the application and only by the local
# E2E Compose overlay.
ARG GO_IMAGE=golang:1.26.8-alpine
ARG RUNTIME_IMAGE=gcr.io/distroless/static-debian12:nonroot
FROM ${GO_IMAGE} AS build
ENV GOTOOLCHAIN=local
WORKDIR /src/backend
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN CGO_ENABLED=0 GOOS=linux go build -tags=e2e -buildvcs=false -trimpath -ldflags="-s -w" -o /out/mail-fixture ./cmd/mail-fixture
FROM ${RUNTIME_IMAGE}
LABEL org.opencontainers.image.title="Lincodex local E2E mail fixture" \
org.opencontainers.image.description="Bounded in-memory Resend-compatible receiver for local browser tests"
WORKDIR /
COPY --from=build /out/mail-fixture /mail-fixture
EXPOSE 8025
USER nonroot:nonroot
ENTRYPOINT ["/mail-fixture"]