summaryrefslogtreecommitdiffstats
path: root/utils/file_backend_s3_test.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2018-03-19 10:53:37 +0000
committerGeorge Goldberg <george@gberg.me>2018-03-19 10:53:37 +0000
commit37f0e5e0ebc0595efe2c65ffb84fa096dc8c5493 (patch)
tree4b791b279109a10a66b62aaeeeae3d5243d2961b /utils/file_backend_s3_test.go
parentfadcdd271a68b38571b75d1d38ab023f940ac83a (diff)
parent4b675b347b5241def7807fab5e01ce9b98531815 (diff)
downloadchat-37f0e5e0ebc0595efe2c65ffb84fa096dc8c5493.tar.gz
chat-37f0e5e0ebc0595efe2c65ffb84fa096dc8c5493.tar.bz2
chat-37f0e5e0ebc0595efe2c65ffb84fa096dc8c5493.zip
Merge branch 'master' into advanced-permissions-phase-1
Diffstat (limited to 'utils/file_backend_s3_test.go')
-rw-r--r--utils/file_backend_s3_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/file_backend_s3_test.go b/utils/file_backend_s3_test.go
index ff42a4d19..a8834f226 100644
--- a/utils/file_backend_s3_test.go
+++ b/utils/file_backend_s3_test.go
@@ -19,14 +19,14 @@ func TestCheckMandatoryS3Fields(t *testing.T) {
cfg.AmazonS3Bucket = "test-mm"
err = CheckMandatoryS3Fields(&cfg)
- if err == nil || err.Message != "api.admin.test_s3.missing_s3_endpoint" {
- t.Fatal("should've failed with missing s3 endpoint")
+ if err != nil {
+ t.Fatal("should've not failed")
}
- cfg.AmazonS3Endpoint = "s3.newendpoint.com"
+ cfg.AmazonS3Endpoint = ""
err = CheckMandatoryS3Fields(&cfg)
- if err == nil || err.Message != "api.admin.test_s3.missing_s3_region" {
- t.Fatal("should've failed with missing s3 region")
+ if err != nil || cfg.AmazonS3Endpoint != "s3.amazonaws.com" {
+ t.Fatal("should've not failed because it should set the endpoint to the default")
}
}