From 80925f7cfd2fe4fe98418119c70e5e36c738f41a Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Tue, 3 Apr 2018 12:41:02 -0700 Subject: Fixing unit tests for Go 1.10 (#8568) --- api4/command_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'api4/command_test.go') diff --git a/api4/command_test.go b/api4/command_test.go index 3be1af061..8c4ce5d50 100644 --- a/api4/command_test.go +++ b/api4/command_test.go @@ -214,6 +214,17 @@ func TestListCommands(t *testing.T) { defer th.TearDown() Client := th.Client + enableCommands := *th.App.Config().ServiceSettings.EnableCommands + enableOnlyAdminIntegrations := *th.App.Config().ServiceSettings.EnableOnlyAdminIntegrations + defer func() { + th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnableCommands = &enableCommands }) + th.App.UpdateConfig(func(cfg *model.Config) { + cfg.ServiceSettings.EnableOnlyAdminIntegrations = &enableOnlyAdminIntegrations + }) + }() + th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableCommands = true }) + th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableOnlyAdminIntegrations = true }) + newCmd := &model.Command{ CreatorId: th.BasicUser.Id, TeamId: th.BasicTeam.Id, -- cgit v1.2.3-1-g7c22