diff --git a/go.mod b/go.mod index 20e1536..a535669 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( require ( github.com/stretchr/testify v1.9.0 - github.com/strowk/foxy-contexts v0.0.4-0.20241208035607-078a2e5414fd + github.com/strowk/foxy-contexts v0.0.4-0.20241208040801-98ae5bd5e918 go.uber.org/mock v0.5.0 k8s.io/api v0.31.3 ) diff --git a/go.sum b/go.sum index 5030511..0f7f25b 100644 --- a/go.sum +++ b/go.sum @@ -88,6 +88,8 @@ github.com/strowk/foxy-contexts v0.0.4-0.20241208034254-a127d64fc38a h1:uI7o/4BJ github.com/strowk/foxy-contexts v0.0.4-0.20241208034254-a127d64fc38a/go.mod h1:mqbY/AmvM5uyoITd6+Qtq5gchqwCaIn5pqgbH7v/DeA= github.com/strowk/foxy-contexts v0.0.4-0.20241208035607-078a2e5414fd h1:fuOaVpR5g7lejUtcEPfSWaLZEo9VPh0JCe3o4588Jxs= github.com/strowk/foxy-contexts v0.0.4-0.20241208035607-078a2e5414fd/go.mod h1:mqbY/AmvM5uyoITd6+Qtq5gchqwCaIn5pqgbH7v/DeA= +github.com/strowk/foxy-contexts v0.0.4-0.20241208040801-98ae5bd5e918 h1:6zQCEawu+1dpgRusOxeYnKgCniTMB3Z6jimA0xMD2e4= +github.com/strowk/foxy-contexts v0.0.4-0.20241208040801-98ae5bd5e918/go.mod h1:mqbY/AmvM5uyoITd6+Qtq5gchqwCaIn5pqgbH7v/DeA= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/main_test.go b/main_test.go index 95a6965..034cc37 100644 --- a/main_test.go +++ b/main_test.go @@ -14,6 +14,9 @@ import ( ) func TestListContexts(t *testing.T) { + if os.Getenv("CI") != "" { + t.Skip("Skipping k3d tests in CI for now") + } ts, err := foxytest.Read("testdata/k8s_contexts") if err != nil { t.Fatal(err) @@ -31,6 +34,7 @@ func TestListTools(t *testing.T) { if err != nil { t.Fatal(err) } + ts.WithLogging() ts.WithExecutable("go", []string{"run", "main.go"}) cntrl := foxytest.NewTestRunner(t) ts.Run(cntrl) @@ -43,6 +47,7 @@ func TestInK3dCluster(t *testing.T) { if os.Getenv("CI") != "" { t.Skip("Skipping k3d tests in CI for now") } + ts, err := foxytest.Read("testdata/with_k3d") if err != nil { t.Fatal(err) @@ -67,7 +72,10 @@ func withK3dCluster(t *testing.T, name string, fn func()) { t.Helper() cmd := exec.Command("k3d", "cluster", "delete", name) cmd.Stderr = os.Stderr - cmd.Run() // precleanup if cluster has leaked from previous test + err := cmd.Run() // precleanup if cluster has leaked from previous test + if err != nil { + t.Logf("error in preclean: %v", err) + } defer deleteK3dCluster(t, name)