summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/apitestlib.go12
-rw-r--r--api/status_test.go1
2 files changed, 13 insertions, 0 deletions
diff --git a/api/apitestlib.go b/api/apitestlib.go
index f65d4e5a9..bcc7de879 100644
--- a/api/apitestlib.go
+++ b/api/apitestlib.go
@@ -86,6 +86,18 @@ func Setup() *TestHelper {
return &TestHelper{}
}
+func ReloadConfigForSetup() {
+ utils.LoadConfig("config.json")
+ utils.InitTranslations(utils.Cfg.LocalizationSettings)
+ utils.Cfg.TeamSettings.MaxUsersPerTeam = 50
+ *utils.Cfg.RateLimitSettings.Enable = false
+ utils.Cfg.EmailSettings.SendEmailNotifications = true
+ utils.Cfg.EmailSettings.SMTPServer = "dockerhost"
+ utils.Cfg.EmailSettings.SMTPPort = "2500"
+ utils.Cfg.EmailSettings.FeedbackEmail = "test@example.com"
+ *utils.Cfg.TeamSettings.EnableOpenServer = true
+}
+
func (me *TestHelper) InitBasic() *TestHelper {
me.BasicClient = me.CreateClient()
me.BasicUser = me.CreateUser(me.BasicClient)
diff --git a/api/status_test.go b/api/status_test.go
index 30bf8d16a..f886d1044 100644
--- a/api/status_test.go
+++ b/api/status_test.go
@@ -205,6 +205,7 @@ func TestStatuses(t *testing.T) {
}
func TestGetStatusesByIds(t *testing.T) {
+ ReloadConfigForSetup()
th := Setup().InitBasic()
Client := th.BasicClient