Wire persistent chunk plan caching into the CLI
This commit is contained in:
21
internal/cli/test_main_test.go
Normal file
21
internal/cli/test_main_test.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
const name = "NOTARIUS_WORKSPACE_CHUNK_CACHE_MODE"
|
||||
previous, existed := os.LookupEnv(name)
|
||||
if err := os.Setenv(name, "bypass"); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
code := m.Run()
|
||||
if existed {
|
||||
_ = os.Setenv(name, previous)
|
||||
} else {
|
||||
_ = os.Unsetenv(name)
|
||||
}
|
||||
os.Exit(code)
|
||||
}
|
||||
Reference in New Issue
Block a user