Files
oc-deploy/src/utils/main_test.go

25 lines
484 B
Go
Raw Normal View History

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