* Refactor S3 integration tests to use weed mini * Fix weed mini flags for sse and parquet tests * Fix IAM test startup: remove -iam.config flag from weed mini * Enhance logging in IAM Makefile to debug startup failure * Simplify weed mini flags and checks in S3 tests (IAM, Parquet, SSE, Copying) * Simplify weed mini flags and checks in all S3 tests * Fix IAM tests: use -s3.iam.config for weed mini * Replace timeout command with portable loop in IAM Makefile * Standardize portable loop-based readiness checks in all S3 Makefiles * Define SERVER_DIR in retention Makefile * Fix versioning and retention Makefiles: remove unsupported weed mini flags * fix filer_group test * fix cors * emojis * fix sse * fix retention * fixes * fix * fixes * fix parquet * fixes * fix * clean up * avoid duplicated debug server * Update .gitignore * simplify * clean up * add credentials * bind * delay * Update Makefile * Update Makefile * check ready * delay * update remote credentials * Update Makefile * clean up * kill * Update Makefile * update credentials
Filer Group S3 Tests
These tests verify that S3 bucket operations work correctly when a filer group is configured.
Background
When SeaweedFS is configured with a filer group (via -filer.group option), collections are named with the filer group prefix:
Collection name = {filerGroup}_{bucketName}
For example, with filer group mygroup and bucket mybucket, the collection will be named mygroup_mybucket.
Issue Being Tested
This test suite was created to verify the fix for a bug where:
- The admin UI was using just the bucket name when deleting collections
- This caused collection deletion to fail when a filer group was configured
- After bucket deletion via admin UI, the collection data would be orphaned
Running the Tests
Prerequisites
- SeaweedFS servers must be running with a filer group configured
- The S3 gateway must be accessible
- Master server must be accessible for collection verification
Quick Start
# Set environment variables
export FILER_GROUP=testgroup
export S3_ENDPOINT=http://localhost:8333
export MASTER_ADDRESS=localhost:9333
# Run tests
go test -v ./...
Using the Makefile
# Start test servers with filer group configured
make start-servers FILER_GROUP=testgroup
# Run tests
make test
# Stop servers
make stop-servers
# Or run full test cycle
make full-test
Configuration
Tests can be configured via:
-
Environment variables:
FILER_GROUP: The filer group name (required for tests to run)S3_ENDPOINT: S3 API endpoint (default:http://localhost:8333)MASTER_ADDRESS: Master server address (default: localhost:9333)
-
test_config.jsonfile
Test Cases
TestFilerGroupCollectionNaming
Verifies that when a bucket is created and objects are uploaded:
- The collection is created with the correct filer group prefix
- Bucket deletion removes the correctly-named collection
TestBucketDeletionWithFilerGroup
Specifically tests that bucket deletion via S3 API correctly deletes the collection when filer group is configured.
TestMultipleBucketsWithFilerGroup
Tests creating and deleting multiple buckets to ensure the filer group prefix is correctly applied and removed for all buckets.
Expected Behavior
With filer group testgroup:
| Bucket Name | Expected Collection Name |
|---|---|
| mybucket | testgroup_mybucket |
| test-123 | testgroup_test-123 |
Without filer group:
| Bucket Name | Expected Collection Name |
|---|---|
| mybucket | mybucket |
| test-123 | test-123 |