diff options
Diffstat (limited to 'api')
-rw-r--r-- | api/apitestlib.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/api/apitestlib.go b/api/apitestlib.go index 58e2a5965..4c4773318 100644 --- a/api/apitestlib.go +++ b/api/apitestlib.go @@ -196,7 +196,7 @@ func (me *TestHelper) CreateUser(client *model.Client) *model.User { id := model.NewId() user := &model.User{ - Email: "success+" + id + "@simulator.amazonses.com", + Email: GenerateTestEmail(), Username: "un_" + id, Nickname: "nn_" + id, Password: "Password1", @@ -360,7 +360,10 @@ func (me *TestHelper) LoginSystemAdmin() { } 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 GenerateTestTeamName() string { |