From 6daa336429009fc1a0cb169f9fe0de69153f7c51 Mon Sep 17 00:00:00 2001 From: Bekir Dogan Date: Fri, 26 Jul 2024 20:50:50 +0100 Subject: [PATCH] enable minikube e2e tests on github actions --- .github/workflows/ci-test.yml | 3 +++ cmd/main_test.go | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 1549e57..7f2874c 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -19,3 +19,6 @@ jobs: with: go-version-file: 'go.mod' - run: make test + - name: Start minikube + uses: medyagh/setup-minikube@latest + - run: ASSUME_MINIKUBE_IS_CONFIGURED=true make test-e2e \ No newline at end of file diff --git a/cmd/main_test.go b/cmd/main_test.go index 71703ee..8a596fc 100644 --- a/cmd/main_test.go +++ b/cmd/main_test.go @@ -107,11 +107,13 @@ $`, } } -func TestE2EWithVanillaMinikube(t *testing.T) { +func TestE2EAgainstVanillaMinikube(t *testing.T) { if os.Getenv("RUN_E2E_TESTS") != "true" { t.Skip("Skipping e2e test") } - defer startMinikube(t, "kubectl-status-e2e")() + if os.Getenv("ASSUME_MINIKUBE_IS_CONFIGURED") != "true" { + defer startMinikube(t, "kubectl-status-e2e")() + } defer plugin.SetDurationRound(func(_ interface{}) string { return "1m" })() klog.InitFlags(nil) t.Log("starting tests...")