aboutsummaryrefslogtreecommitdiff
path: root/test/mq/Dockerfile.test
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2025-06-23 11:20:58 -0700
committerchrislu <chris.lu@gmail.com>2025-06-23 11:20:58 -0700
commit6a9707945488ca606598b896daeabf52e49ce4b5 (patch)
tree91fb4414286c247c79a4ec5de7ddf11672f80f4d /test/mq/Dockerfile.test
parent1c879148d81580fa1c0d9d25c984895a36479a73 (diff)
downloadseaweedfs-6a9707945488ca606598b896daeabf52e49ce4b5.tar.xz
seaweedfs-6a9707945488ca606598b896daeabf52e49ce4b5.zip
running
Diffstat (limited to 'test/mq/Dockerfile.test')
-rw-r--r--test/mq/Dockerfile.test18
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