From 0a508133d5e1f468bc378a600f9cb3ca0c663268 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 18 Oct 2017 14:13:14 -0700 Subject: fix email race condition (#7656) --- api4/apitestlib.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'api4/apitestlib.go') diff --git a/api4/apitestlib.go b/api4/apitestlib.go index d54420f57..4bd8276d5 100644 --- a/api4/apitestlib.go +++ b/api4/apitestlib.go @@ -446,7 +446,10 @@ func (me *TestHelper) LinkUserToTeam(user *model.User, team *model.Team) { } func GenerateTestEmail() string { - return strings.ToLower("success+" + model.NewId() + "@simulator.amazonses.com") + if utils.Cfg.EmailSettings.SMTPServer != "dockerhost" { + return strings.ToLower("success+" + model.NewId() + "@simulator.amazonses.com") + } + return strings.ToLower(model.NewId() + "@dockerhost") } func GenerateTestUsername() string { -- cgit v1.2.3-1-g7c22