Files
Ydisks-Xianyu-Helper/Dockerfile.browser-test

14 lines
538 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM golang:1.26-trixie AS go-toolchain
# 复用生产运行镜像中已经安装并验证过的 Chromium、Node 和 Playwright driver,
# 只补 Go 工具链来执行真实浏览器集成测试。
FROM ydisks-xianyu-helper:functional
ENV PATH=/usr/local/go/bin:${PATH}
ENV CGO_ENABLED=0
WORKDIR /src
COPY --from=go-toolchain /usr/local/go /usr/local/go
COPY go.mod go.sum ./
RUN go mod download
COPY . .
CMD ["go", "test", "-timeout=2m", "./internal/browser", "-run", "TestTokenCaptchaCDPFallbackBrowserIntegration", "-v", "-count=1"]