summaryrefslogtreecommitdiffstats
path: root/api4/system_test.go
diff options
context:
space:
mode:
authorCarlos Tadeu Panato Junior <ctadeu@gmail.com>2018-05-10 11:56:11 +0200
committerSaturnino Abril <saturnino.abril@gmail.com>2018-05-10 17:56:11 +0800
commitdb6b8f6238853c6e7e48dc8015a0b25f97ee232a (patch)
treee081cd4aff02ac7dd4db1254bc0b6afad1ed29d1 /api4/system_test.go
parent454c113b4e74fac86175a1570913576c305b8e1d (diff)
downloadchat-db6b8f6238853c6e7e48dc8015a0b25f97ee232a.tar.gz
chat-db6b8f6238853c6e7e48dc8015a0b25f97ee232a.tar.bz2
chat-db6b8f6238853c6e7e48dc8015a0b25f97ee232a.zip
fix test and add new (#8759)
Diffstat (limited to 'api4/system_test.go')
-rw-r--r--api4/system_test.go12
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) {