mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-13 20:44:43 +08:00
fixed test based on new logic
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package controller
|
package controller
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -193,6 +194,7 @@ func TestSecurityCheck(t *testing.T) {
|
|||||||
//these seem to work but not sure it the tests are really testing the functionality
|
//these seem to work but not sure it the tests are really testing the functionality
|
||||||
|
|
||||||
database.InitializeDatabase()
|
database.InitializeDatabase()
|
||||||
|
os.Setenv("MASTER_KEY", "secretkey")
|
||||||
t.Run("NoNetwork", func(t *testing.T) {
|
t.Run("NoNetwork", func(t *testing.T) {
|
||||||
err, networks, username := SecurityCheck(false, "", "Bearer secretkey")
|
err, networks, username := SecurityCheck(false, "", "Bearer secretkey")
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
|
Reference in New Issue
Block a user