diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-12-06 10:49:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-06 10:49:34 -0500 |
commit | 026553e4f87bfc647a5c03129752e30fc523fa07 (patch) | |
tree | d5403c760151c0fa26fc6d020f7f4326ea9d6f8a /api/apitestlib.go | |
parent | dcf11a14d8363c79ab62aefca46834d6daa615ab (diff) | |
download | chat-026553e4f87bfc647a5c03129752e30fc523fa07.tar.gz chat-026553e4f87bfc647a5c03129752e30fc523fa07.tar.bz2 chat-026553e4f87bfc647a5c03129752e30fc523fa07.zip |
Improving command line interface (#4689)
Diffstat (limited to 'api/apitestlib.go')
-rw-r--r-- | api/apitestlib.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/api/apitestlib.go b/api/apitestlib.go index 9345d3fc4..f11613a90 100644 --- a/api/apitestlib.go +++ b/api/apitestlib.go @@ -37,6 +37,8 @@ func SetupEnterprise() *TestHelper { utils.DisableDebugLogForTest() utils.License.Features.SetDefaults() NewServer() + InitStores() + InitRouter() StartServer() utils.InitHTML() InitApi() @@ -58,6 +60,8 @@ func Setup() *TestHelper { *utils.Cfg.RateLimitSettings.Enable = false utils.DisableDebugLogForTest() NewServer() + InitStores() + InitRouter() StartServer() InitApi() utils.EnableDebugLogForTest() @@ -90,10 +94,7 @@ func (me *TestHelper) InitSystemAdmin() *TestHelper { me.SystemAdminUser = me.CreateUser(me.SystemAdminClient) LinkUserToTeam(me.SystemAdminUser, me.SystemAdminTeam) me.SystemAdminClient.SetTeamId(me.SystemAdminTeam.Id) - c := &Context{} - c.RequestId = model.NewId() - c.IpAddress = "cmd_line" - UpdateUserRoles(c, me.SystemAdminUser, model.ROLE_SYSTEM_USER.Id+" "+model.ROLE_SYSTEM_ADMIN.Id) + UpdateUserRoles(me.SystemAdminUser, model.ROLE_SYSTEM_USER.Id+" "+model.ROLE_SYSTEM_ADMIN.Id) me.SystemAdminUser.Password = "Password1" me.LoginSystemAdmin() me.SystemAdminChannel = me.CreateChannel(me.SystemAdminClient, me.SystemAdminTeam) |