Alan Yeung il y a 1 an
Parent
commit
027a248a1f

+ 1 - 2
mod/auth/accesscontrol/blacklist/blacklistmanager_test.go

@@ -3,7 +3,6 @@ package blacklist
 import (
 	"os"
 	"testing"
-	"time"
 
 	"imuslab.com/arozos/mod/database"
 )
@@ -26,7 +25,7 @@ func setupSuite(t *testing.T) func(t *testing.T) {
 	return func(t *testing.T) {
 		//t.Log("Cleaning up")
 		sysDb.Close()
-		time.Sleep(5 * time.Second)
+		//time.Sleep(5 * time.Second)
 		err := os.RemoveAll(dbFilePath)
 		if err != nil {
 			t.Fatalf("Failed to clean up: %v", err)

+ 3 - 0
mod/auth/accesscontrol/whitelist/whitelist_test.go

@@ -25,6 +25,9 @@ func setupSuite(t *testing.T) func(t *testing.T) {
 	return func(t *testing.T) {
 		//t.Log("Cleaning up")
 		sysdb.Close()
+		//pp, _ := os.Getwd()
+		//t.Log(pp)
+		//t.Log(filepath.Dir(pp + "/" + dbFilePath + dbFileName))
 
 		err := os.RemoveAll(dbFilePath)
 		if err != nil {