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) }