2024-09-02 13:44:44 +02:00
|
|
|
package chart
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
"path/filepath"
|
|
|
|
)
|
|
|
|
|
|
|
|
var TEST_DEST_DIR = "../wrk_chart"
|
|
|
|
var TEST_SRC_DIR = filepath.Join("../../test", "chart")
|
|
|
|
|
|
|
|
func TestMain(m *testing.M) {
|
|
|
|
folderPath := TEST_DEST_DIR
|
|
|
|
|
|
|
|
os.RemoveAll(folderPath)
|
|
|
|
os.MkdirAll(folderPath, os.ModePerm)
|
|
|
|
|
|
|
|
// call flag.Parse() here if TestMain uses flags
|
|
|
|
exitCode := m.Run()
|
|
|
|
|
|
|
|
os.RemoveAll(folderPath)
|
|
|
|
os.Exit(exitCode)
|
2024-09-02 09:09:46 +02:00
|
|
|
}
|