summaryrefslogtreecommitdiffstats
path: root/utils/file_backend_s3_test.go
diff options
context:
space:
mode:
authorJesús Espino <jespinog@gmail.com>2018-09-20 19:07:03 +0200
committerChristopher Speller <crspeller@gmail.com>2018-09-20 10:07:03 -0700
commita08df883b4ddb514d53b518f41431ce7efb50d8f (patch)
tree9e16aeb09188f4aa34b268b77d78e7ebaa5a5978 /utils/file_backend_s3_test.go
parentf1be975d7ab17a7da89ddb3cf6fea2c1b282a89e (diff)
downloadchat-a08df883b4ddb514d53b518f41431ce7efb50d8f.tar.gz
chat-a08df883b4ddb514d53b518f41431ce7efb50d8f.tar.bz2
chat-a08df883b4ddb514d53b518f41431ce7efb50d8f.zip
Move file backend to its own service (#9435)
* Move file backend to its own service * Moving utils/inbucket to mailservice package
Diffstat (limited to 'utils/file_backend_s3_test.go')
-rw-r--r--utils/file_backend_s3_test.go32
1 files changed, 0 insertions, 32 deletions
diff --git a/utils/file_backend_s3_test.go b/utils/file_backend_s3_test.go
deleted file mode 100644
index a8834f226..000000000
--- a/utils/file_backend_s3_test.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2018-present Mattermost, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-package utils
-
-import (
- "testing"
-
- "github.com/mattermost/mattermost-server/model"
-)
-
-func TestCheckMandatoryS3Fields(t *testing.T) {
- cfg := model.FileSettings{}
-
- err := CheckMandatoryS3Fields(&cfg)
- if err == nil || err.Message != "api.admin.test_s3.missing_s3_bucket" {
- t.Fatal("should've failed with missing s3 bucket")
- }
-
- cfg.AmazonS3Bucket = "test-mm"
- err = CheckMandatoryS3Fields(&cfg)
- if err != nil {
- t.Fatal("should've not failed")
- }
-
- cfg.AmazonS3Endpoint = ""
- err = CheckMandatoryS3Fields(&cfg)
- if err != nil || cfg.AmazonS3Endpoint != "s3.amazonaws.com" {
- t.Fatal("should've not failed because it should set the endpoint to the default")
- }
-
-}