diff options
-rw-r--r-- | api4/system_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/api4/system_test.go b/api4/system_test.go index 0a987644d..f46ae7436 100644 --- a/api4/system_test.go +++ b/api4/system_test.go @@ -614,6 +614,18 @@ func TestS3TestConnection(t *testing.T) { config.FileSettings.AmazonS3Region = "" _, resp = th.SystemAdminClient.TestS3Connection(&config) CheckOKStatus(t, resp) + + config.FileSettings.AmazonS3Bucket = "Wrong_bucket" + _, resp = th.SystemAdminClient.TestS3Connection(&config) + CheckInternalErrorStatus(t, resp) + if resp.Error.Message != "Unable to create bucket" { + t.Fatal("should return error ") + } + + config.FileSettings.AmazonS3Bucket = "shouldcreatenewbucket" + _, resp = th.SystemAdminClient.TestS3Connection(&config) + CheckOKStatus(t, resp) + } func TestSupportedTimezones(t *testing.T) { |