add domain env to test
This commit is contained in:
@@ -19,6 +19,7 @@ func TestDatabase(t *testing.T) {
|
|||||||
// set enviroment variables
|
// set enviroment variables
|
||||||
os.Setenv("ACCESS_SECRET", "12345678910111213141516171819202")
|
os.Setenv("ACCESS_SECRET", "12345678910111213141516171819202")
|
||||||
os.Setenv("REFRESH_SECRET", "9998979695949392919089888786858")
|
os.Setenv("REFRESH_SECRET", "9998979695949392919089888786858")
|
||||||
|
os.Setenv("DOMAIN", "localhost")
|
||||||
|
|
||||||
dbName := "user.db"
|
dbName := "user.db"
|
||||||
if _, err := os.Stat(dbName); err == nil {
|
if _, err := os.Stat(dbName); err == nil {
|
||||||
@@ -160,6 +161,7 @@ func TestDatabase(t *testing.T) {
|
|||||||
func TestLoginAndAuthorization(t *testing.T) {
|
func TestLoginAndAuthorization(t *testing.T) {
|
||||||
os.Setenv("ACCESS_SECRET", "12345678910111213141516171819202")
|
os.Setenv("ACCESS_SECRET", "12345678910111213141516171819202")
|
||||||
os.Setenv("REFRESH_SECRET", "9998979695949392919089888786858")
|
os.Setenv("REFRESH_SECRET", "9998979695949392919089888786858")
|
||||||
|
os.Setenv("DOMAIN", "localhost")
|
||||||
|
|
||||||
gin.SetMode(gin.TestMode)
|
gin.SetMode(gin.TestMode)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user