mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
fix test and add new (#8759)
This commit is contained in:
committed by
Saturnino Abril
parent
454c113b4e
commit
db6b8f6238
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user