diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2025-07-02 18:03:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-02 18:03:17 -0700 |
| commit | 1db7c2b8aad59177f9ccb32f156908faf0c13eca (patch) | |
| tree | b1ea2df918591ab01822e3bd3ce08277825c47fb /weed/s3api/s3api_put_object_helper_test.go | |
| parent | 6b706f9ccdf46046133c867c4240c4e8594da5b3 (diff) | |
| download | seaweedfs-1db7c2b8aad59177f9ccb32f156908faf0c13eca.tar.xz seaweedfs-1db7c2b8aad59177f9ccb32f156908faf0c13eca.zip | |
Add credential storage (#6938)
* add credential store interface
* load credential.toml
* lint
* create credentialManager with explicit store type
* add type name
* InitializeCredentialManager
* remove unused functions
* fix missing import
* fix import
* fix nil configuration
Diffstat (limited to 'weed/s3api/s3api_put_object_helper_test.go')
| -rw-r--r-- | weed/s3api/s3api_put_object_helper_test.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/weed/s3api/s3api_put_object_helper_test.go b/weed/s3api/s3api_put_object_helper_test.go index 774741a0d..455701772 100644 --- a/weed/s3api/s3api_put_object_helper_test.go +++ b/weed/s3api/s3api_put_object_helper_test.go @@ -5,13 +5,15 @@ import ( "strings" "testing" + "github.com/seaweedfs/seaweedfs/weed/credential" + _ "github.com/seaweedfs/seaweedfs/weed/credential/memory" "github.com/seaweedfs/seaweedfs/weed/s3api/s3err" ) func TestGetRequestDataReader_ChunkedEncodingWithoutIAM(t *testing.T) { // Create an S3ApiServer with IAM disabled s3a := &S3ApiServer{ - iam: NewIdentityAccessManagement(&S3ApiServerOption{}), + iam: NewIdentityAccessManagementWithStore(&S3ApiServerOption{}, string(credential.StoreTypeMemory)), } // Ensure IAM is disabled for this test s3a.iam.isAuthEnabled = false @@ -85,7 +87,7 @@ func TestGetRequestDataReader_ChunkedEncodingWithoutIAM(t *testing.T) { func TestGetRequestDataReader_AuthTypeDetection(t *testing.T) { // Create an S3ApiServer with IAM disabled s3a := &S3ApiServer{ - iam: NewIdentityAccessManagement(&S3ApiServerOption{}), + iam: NewIdentityAccessManagementWithStore(&S3ApiServerOption{}, string(credential.StoreTypeMemory)), } s3a.iam.isAuthEnabled = false @@ -120,7 +122,7 @@ func TestGetRequestDataReader_AuthTypeDetection(t *testing.T) { func TestGetRequestDataReader_IAMEnabled(t *testing.T) { // Create an S3ApiServer with IAM enabled s3a := &S3ApiServer{ - iam: NewIdentityAccessManagement(&S3ApiServerOption{}), + iam: NewIdentityAccessManagementWithStore(&S3ApiServerOption{}, string(credential.StoreTypeMemory)), } s3a.iam.isAuthEnabled = true |
