From 2eed7e4ebf88da730a93d91ec35139d74db85bc0 Mon Sep 17 00:00:00 2001 From: Martin Kraft Date: Wed, 9 May 2018 17:18:54 -0400 Subject: Fixes incorrect MiB size. (#8750) --- app/emoji.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/emoji.go b/app/emoji.go index f48501cf9..2f957fbcc 100644 --- a/app/emoji.go +++ b/app/emoji.go @@ -23,7 +23,7 @@ import ( ) const ( - MaxEmojiFileSize = 1000 * 1024 // 1 MB + MaxEmojiFileSize = 1 << 20 // 1 MB MaxEmojiWidth = 128 MaxEmojiHeight = 128 ) -- cgit v1.2.3-1-g7c22 From 454c113b4e74fac86175a1570913576c305b8e1d Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 9 May 2018 18:03:28 -0700 Subject: Removing bad test. --- api4/system_test.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/api4/system_test.go b/api4/system_test.go index d4134f8e2..0a987644d 100644 --- a/api4/system_test.go +++ b/api4/system_test.go @@ -614,13 +614,6 @@ 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 != "Error checking if bucket exists." { - t.Fatal("should return error ") - } } func TestSupportedTimezones(t *testing.T) { -- cgit v1.2.3-1-g7c22 From db6b8f6238853c6e7e48dc8015a0b25f97ee232a Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Thu, 10 May 2018 11:56:11 +0200 Subject: fix test and add new (#8759) --- api4/system_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) { -- cgit v1.2.3-1-g7c22