diff options
| author | Chris Lu <chris.lu@gmail.com> | 2025-12-01 15:40:06 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2025-12-01 15:40:06 -0800 |
| commit | a33e5a9e6a696049e8f0e1b62b9e3ded8201675f (patch) | |
| tree | e7c00ed4b445b36a8f1bea284d834143db874198 /test/s3 | |
| parent | 8c585a9682748353c78b96e5f55238074497b35a (diff) | |
| download | seaweedfs-a33e5a9e6a696049e8f0e1b62b9e3ded8201675f.tar.xz seaweedfs-a33e5a9e6a696049e8f0e1b62b9e3ded8201675f.zip | |
Add S3 object tagging tests to CI workflow
- Modified test/s3/tagging/s3_tagging_test.go to use environment variables for configurable endpoint and credentials
- Added s3-tagging-tests job to .github/workflows/s3-go-tests.yml to run tagging tests in CI
- Tests will now run automatically on pull requests
Diffstat (limited to 'test/s3')
| -rw-r--r-- | test/s3/tagging/s3_tagging_test.go | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/test/s3/tagging/s3_tagging_test.go b/test/s3/tagging/s3_tagging_test.go index 1dd4895b6..c490ca1aa 100644 --- a/test/s3/tagging/s3_tagging_test.go +++ b/test/s3/tagging/s3_tagging_test.go @@ -3,6 +3,7 @@ package tagging import ( "context" "fmt" + "os" "strings" "testing" "time" @@ -29,10 +30,22 @@ type S3TestConfig struct { // getDefaultConfig returns a fresh instance of the default test configuration func getDefaultConfig() *S3TestConfig { + endpoint := os.Getenv("S3_ENDPOINT") + if endpoint == "" { + endpoint = "http://localhost:8333" // Default SeaweedFS S3 port + } + accessKey := os.Getenv("S3_ACCESS_KEY") + if accessKey == "" { + accessKey = "some_access_key1" + } + secretKey := os.Getenv("S3_SECRET_KEY") + if secretKey == "" { + secretKey = "some_secret_key1" + } return &S3TestConfig{ - Endpoint: "http://localhost:8333", // Default SeaweedFS S3 port - AccessKey: "some_access_key1", - SecretKey: "some_secret_key1", + Endpoint: endpoint, + AccessKey: accessKey, + SecretKey: secretKey, Region: "us-east-1", BucketPrefix: "test-tagging-", UseSSL: false, |
