This commit is contained in:
admju
2024-09-09 10:11:10 +00:00
parent 53a614bd7e
commit a1af83689d
6 changed files with 65 additions and 14 deletions

View File

@@ -1,23 +1,25 @@
package utils
// https://pkg.go.dev/github.com/stretchr/testify/assert
import (
"os"
"testing"
"path/filepath"
"os"
"testing"
"path/filepath"
)
var TEST_DEST_DIR = "../wrk_utils"
var TEST_SRC_DIR = filepath.Join("../../test", "utils")
func TestMain(m *testing.M) {
folderPath := TEST_DEST_DIR
folderPath := TEST_DEST_DIR
os.RemoveAll(folderPath)
os.MkdirAll(folderPath, os.ModePerm)
os.RemoveAll(folderPath)
os.MkdirAll(folderPath, os.ModePerm)
// call flag.Parse() here if TestMain uses flags
exitCode := m.Run()
// call flag.Parse() here if TestMain uses flags
exitCode := m.Run()
os.RemoveAll(folderPath)
os.Exit(exitCode)
os.RemoveAll(folderPath)
os.Exit(exitCode)
}