Browse Source

chore: Clean up duplicate files and update gitignore

- Remove duplicate enhanced_s3_server.go and iam_config.json from root
- Remove unnecessary Dockerfile.test and backup files
- Update gitignore for better file management
- Consolidate IAM integration files in proper locations
pull/7160/head
chrislu 1 month ago
parent
commit
4329997b76
  1. 3
      .gitignore
  2. 70
      test/s3/iam/Dockerfile.test

3
.gitignore

@ -120,3 +120,6 @@ docker/admin_integration/weed-local
/test/s3/sse/filerldb2
test/s3/sse/weed-test.log
ADVANCED_IAM_DEVELOPMENT_PLAN.md
/test/s3/iam/test-volume-data
*.log
weed-iam

70
test/s3/iam/Dockerfile.test

@ -1,70 +0,0 @@
# Dockerfile for SeaweedFS S3 IAM Integration Tests
FROM golang:1.24-alpine AS builder
# Install build dependencies
RUN apk add --no-cache git make curl bash
# Set working directory
WORKDIR /app
# Copy go modules first for better caching
COPY go.mod go.sum ./
RUN go mod download
# Copy source code
COPY ../../../ .
# Build SeaweedFS binary
RUN go build -o weed ./main.go
# Create runtime image
FROM alpine:latest
# Install runtime dependencies
RUN apk add --no-cache \
bash \
curl \
ca-certificates \
&& rm -rf /var/cache/apk/*
# Create test user
RUN addgroup -g 1000 seaweedfs && \
adduser -D -u 1000 -G seaweedfs seaweedfs
# Set working directory
WORKDIR /app
# Copy built binary
COPY --from=builder /app/weed /usr/local/bin/weed
# Copy test files
COPY . /app/test/s3/iam/
# Set permissions
RUN chown -R seaweedfs:seaweedfs /app
# Switch to test user
USER seaweedfs
# Set environment variables
ENV WEED_BINARY=/usr/local/bin/weed
ENV S3_PORT=8333
ENV FILER_PORT=8888
ENV MASTER_PORT=9333
ENV VOLUME_PORT=8080
ENV LOG_LEVEL=2
ENV TEST_TIMEOUT=30m
# Expose ports
EXPOSE 8333 8888 9333 8080
# Work in test directory
WORKDIR /app/test/s3/iam
# Health check
HEALTHCHECK --interval=10s --timeout=5s --start-period=30s --retries=3 \
CMD curl -f http://localhost:8333/ || exit 1
# Default command runs the tests
CMD ["make", "test"]
Loading…
Cancel
Save