From b3c7f783ed4b17eeab5e0c32ad573c0c70085f57 Mon Sep 17 00:00:00 2001 From: Lakhan Samani Date: Sat, 8 Jan 2022 18:16:26 +0530 Subject: [PATCH] Update tests --- .env.sample | 5 +++-- server/__test__/test.go | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.env.sample b/.env.sample index 18e8c2b..6bd3a9e 100644 --- a/.env.sample +++ b/.env.sample @@ -3,8 +3,9 @@ DATABASE_URL=data.db DATABASE_TYPE=sqlite ADMIN_SECRET=admin JWT_SECRET=random_string -SENDER_EMAIL=username -SENDER_PASSWORD=password +SENDER_EMAIL=info@authorizer.dev +SMTP_USERNAME=username +SMTP_PASSWORD=password SMTP_HOST=smtp.mailtrap.io SMTP_PORT=2525 JWT_TYPE=HS256 diff --git a/server/__test__/test.go b/server/__test__/test.go index 1abd9f5..b43232f 100644 --- a/server/__test__/test.go +++ b/server/__test__/test.go @@ -2,8 +2,10 @@ package test import ( "context" + "fmt" "net/http" "net/http/httptest" + "time" "github.com/authorizerdev/authorizer/server/constants" "github.com/authorizerdev/authorizer/server/db" @@ -66,7 +68,7 @@ func createContext(s TestSetup) (*http.Request, context.Context) { func testSetup() TestSetup { testData := TestData{ - Email: "authorizer_tester@yopmail.com", + Email: fmt.Sprintf("%d_authorizer_tester@yopmail.com", time.Now().Unix()), Password: "test", }