committed by
GitHub
parent
5609594b2a
commit
58f4058633
@@ -41,15 +41,24 @@ func (stub *testInstance) SPNGroup() *mgr.ExtendedGroup {
|
||||
func (stub *testInstance) Stopping() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (stub *testInstance) SetCmdLineOperation(f func() error) {}
|
||||
|
||||
func (stub *testInstance) DataDir() string {
|
||||
return _dataDir
|
||||
}
|
||||
|
||||
var _dataDir string
|
||||
|
||||
func runTest(m *testing.M) error {
|
||||
conf.EnablePublicHub(true) // Make hub config available.
|
||||
ds, err := config.InitializeUnitTestDataroot("test-crew")
|
||||
var err error
|
||||
// Create a temporary directory for the data
|
||||
_dataDir, err = os.MkdirTemp("", "")
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to initialize dataroot: %w", err)
|
||||
}
|
||||
defer func() { _ = os.RemoveAll(ds) }()
|
||||
defer func() { _ = os.RemoveAll(_dataDir) }()
|
||||
|
||||
instance := &testInstance{}
|
||||
// Init
|
||||
|
||||
Reference in New Issue
Block a user