From 94c53e370fc39a8c40f1a0cc08ce132e4da02838 Mon Sep 17 00:00:00 2001 From: Adam0Brien Date: Fri, 29 Nov 2024 15:01:52 +0000 Subject: [PATCH] test2 --- Dockerfile-e2e | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Dockerfile-e2e b/Dockerfile-e2e index 33b901bc..9172fb2b 100644 --- a/Dockerfile-e2e +++ b/Dockerfile-e2e @@ -4,7 +4,6 @@ ARG TARGETARCH USER root RUN microdnf install -y tar gzip make which gcc gcc-c++ cyrus-sasl-lib findutils git -# install platform specific go version RUN curl -O -J https://dl.google.com/go/go1.22.5.linux-${TARGETARCH}.tar.gz RUN tar -C /usr/local -xzf go1.22.5.linux-${TARGETARCH}.tar.gz RUN ln -s /usr/local/go/bin/go /usr/local/bin/go @@ -20,13 +19,10 @@ COPY api ./api COPY test/e2e . RUN go mod tidy -RUN go test -c -o e2e-inventory-tests +RUN go test ./test/e2e -v -coverprofile=coverage.out FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10-1130 -COPY --from=builder /workspace/e2e-inventory-tests /usr/local/bin/ +COPY --from=builder /workspace/coverage.out /workspace/ -USER 1001 -ENV PATH="$PATH:/usr/local/bin" - # Run the e2e tests -CMD ["./usr/local/bin/e2e-inventory-tests", "-test.v"] +CMD ["sh", "-c", "echo 'Test Coverage Summary:' && go tool cover -func=/workspace/coverage.out"] \ No newline at end of file