diff options
| author | chrislu <chris.lu@gmail.com> | 2025-06-23 11:20:58 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-06-23 11:20:58 -0700 |
| commit | 6a9707945488ca606598b896daeabf52e49ce4b5 (patch) | |
| tree | 91fb4414286c247c79a4ec5de7ddf11672f80f4d /test/mq/Dockerfile.test | |
| parent | 1c879148d81580fa1c0d9d25c984895a36479a73 (diff) | |
| download | seaweedfs-6a9707945488ca606598b896daeabf52e49ce4b5.tar.xz seaweedfs-6a9707945488ca606598b896daeabf52e49ce4b5.zip | |
running
Diffstat (limited to 'test/mq/Dockerfile.test')
| -rw-r--r-- | test/mq/Dockerfile.test | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/test/mq/Dockerfile.test b/test/mq/Dockerfile.test index dfd6b799c..8902df6af 100644 --- a/test/mq/Dockerfile.test +++ b/test/mq/Dockerfile.test @@ -1,4 +1,4 @@ -FROM golang:1.21-alpine +FROM golang:1.24-alpine # Install necessary tools RUN apk add --no-cache \ @@ -9,21 +9,22 @@ RUN apk add --no-cache \ build-base # Set working directory -WORKDIR /app +WORKDIR /workspace # Copy go mod files first for better caching COPY go.mod go.sum ./ RUN go mod download -# Copy the entire source code -COPY . . +# Copy only the necessary source code for building and testing +COPY weed/ ./weed/ +COPY test/mq/integration/ ./test/mq/integration/ # Install test dependencies RUN go install github.com/onsi/ginkgo/v2/ginkgo@latest -RUN go install github.com/stretchr/testify@latest +# Note: testify is a library, not a binary, so it's installed via go mod download -# Build the weed binary for testing -RUN go build -o weed weed/weed.go +# Build the weed binary for testing (optional - tests can use external cluster) +RUN cd weed && go build -o ../weed . # Create test results directory RUN mkdir -p /test-results @@ -33,5 +34,8 @@ ENV CGO_ENABLED=1 ENV GOOS=linux ENV GO111MODULE=on +# Default working directory for tests +WORKDIR /workspace + # Entry point for running tests ENTRYPOINT ["/bin/bash"]
\ No newline at end of file |
