mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-22 08:29:28 +08:00
update TestMain
This commit is contained in:
@@ -40,6 +40,8 @@ func TestMain(m *testing.M) {
|
||||
logger.Log(3, "received node update", update.Action)
|
||||
}
|
||||
}()
|
||||
os.Exit(m.Run())
|
||||
|
||||
}
|
||||
|
||||
func TestCreateNetwork(t *testing.T) {
|
||||
|
@@ -3,6 +3,7 @@ package functions
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/gravitl/netmaker/database"
|
||||
@@ -39,6 +40,8 @@ func TestMain(m *testing.M) {
|
||||
logger.Log(3, "received node update", update.Action)
|
||||
}
|
||||
}()
|
||||
os.Exit(m.Run())
|
||||
|
||||
}
|
||||
|
||||
func TestNetworkExists(t *testing.T) {
|
||||
|
@@ -3,6 +3,7 @@ package logic
|
||||
import (
|
||||
"context"
|
||||
"net"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/google/uuid"
|
||||
@@ -30,6 +31,7 @@ func TestMain(m *testing.M) {
|
||||
logger.Log(3, "received node update", update.Action)
|
||||
}
|
||||
}()
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
func TestCheckPorts(t *testing.T) {
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package pro
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/google/uuid"
|
||||
@@ -13,6 +14,7 @@ import (
|
||||
func TestMain(m *testing.M) {
|
||||
database.InitializeDatabase()
|
||||
defer database.CloseDB()
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
func TestNetworkUserLogic(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user