* 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
S3 Object Tagging Tests
This directory contains tests for S3 object tagging functionality.
Issue Reference
These tests were created to verify the fix for GitHub Issue #7589: S3 object Tags query comes back empty
Problem Description
When uploading an object with tags using the X-Amz-Tagging header, the tags were not being stored.
When querying the object tagging with GetObjectTagging, the response was empty.
This was a regression between SeaweedFS 4.00 and 4.01.
Root Cause
The putToFiler function in s3api_object_handlers_put.go was not parsing the X-Amz-Tagging header
and storing the tags in the entry's Extended metadata. The code was only copying user metadata
(headers starting with X-Amz-Meta-) but not object tags.
Fix
Added tag parsing logic to putToFiler that:
- Reads the
X-Amz-Taggingheader - Parses it using
url.ParseQuery()for proper URL decoding - Stores each tag with the prefix
X-Amz-Tagging-in the entry's Extended metadata
Running Tests
# Run all tagging tests
cd test/s3/tagging
make test
# Run specific test
make test-upload
# Or using go test directly
go test -v ./...
Test Cases
- TestObjectTaggingOnUpload - Basic test for tags sent during object upload
- TestObjectTaggingOnUploadWithSpecialCharacters - Tests URL-encoded tag values
- TestObjectTaggingOnUploadWithEmptyValue - Tests tags with empty values
- TestPutObjectTaggingAPI - Tests the PutObjectTagging API separately
- TestDeleteObjectTagging - Tests tag deletion
- TestTagsNotPreservedAfterObjectOverwrite - Verifies AWS S3 behavior on overwrite
- TestMaximumNumberOfTags - Tests storing the maximum 10 tags
- TestTagCountHeader - Tests the x-amz-tagging-count header in HeadObject