Files
seaweedfs/test/s3/delete/Makefile
T
Chris Lu ef1d703054 Complete S3 integration test modernization
- Implement TestMain-based auto server management for all 13 S3 test suites
- Fix import paths to use full module names instead of relative imports
- Update Makefiles to use correct build targets and binary detection
- Enhance testutil with improved binary discovery and credential handling
- Fix test session creation to use explicit AWS credentials
- Validate infrastructure with successful test execution
- Update documentation with implementation details and usage instructions

All S3 test suites now support:
- make test-with-server: Auto-managed server lifecycle
- make test-external: Use existing server (for CI/CD)
- Consistent build and dependency checking
- Proper error handling and logging
2025-12-24 19:42:30 -08:00

45 lines
1.4 KiB
Makefile

# Makefile for SeaweedFS S3 Delete tests
# Tests auto-manage server via TestMain using weed mini
.PHONY: test test-quick test-external test-with-server clean check-deps build
# Build SeaweedFS binary if not exists
build:
@echo "Building SeaweedFS binary..."
@cd ../../../ && make install
@which weed > /dev/null 2>&1 || (echo "SeaweedFS binary not found in PATH" && exit 1)
# Check dependencies
check-deps: build
@which weed > /dev/null 2>&1 || (echo "SeaweedFS binary not found in PATH" && exit 1)
@echo "✅ Dependencies available"
# Run all tests (auto-manages weed mini server via TestMain)
test: check-deps
@echo "Running all S3 delete tests..."
@go test -v -timeout=10m ./...
# Run quick tests (uses TEST_PATTERN if provided)
test-quick: check-deps
@echo "Running quick S3 delete tests..."
@if [ -z "$(TEST_PATTERN)" ]; then \
go test -v -timeout=10m ./...; \
else \
go test -v -timeout=10m -run "$(TEST_PATTERN)" ./...; \
fi
# Run tests against external server (CI/CD mode)
test-external: check-deps
@echo "Running tests against external server (USE_EXTERNAL_SERVER=true)..."
@USE_EXTERNAL_SERVER=true go test -v -timeout=10m ./...
# Run tests with auto-managed server (CI/CD target)
test-with-server: test
# Clean up test artifacts
clean:
@echo "Cleaning up test artifacts..."
@rm -f *.log *.pid
@go clean -testcache
@echo "✅ Cleanup completed"