added try to use func and edited tests

This commit is contained in:
0xdcarns
2023-02-15 15:52:58 -05:00
parent db4ea9faa4
commit 0e5e34ef0c
3 changed files with 76 additions and 27 deletions

View File

@@ -1,6 +1,7 @@
package logic
import (
"context"
"net"
"testing"
@@ -13,6 +14,13 @@ import (
func TestCheckPorts(t *testing.T) {
database.InitializeDatabase()
defer database.CloseDB()
peerUpdate := make(chan *models.Node)
go ManageZombies(context.Background(), peerUpdate)
go func() {
for _ = range peerUpdate {
//do nothing
}
}()
h := models.Host{
ID: uuid.New(),