From c32283acbd50c8b9b3ec0a620afbb96720e490c5 Mon Sep 17 00:00:00 2001 From: Bohan Chen Date: Thu, 25 Jan 2024 17:32:35 -0500 Subject: [PATCH] skip slsa e2e tests by default we shouldnt test an experimental feature by default Signed-off-by: Bohan Chen --- .github/workflows/ci.yaml | 2 +- test/slsa_test.go | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2b1e923cc..800da626d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -409,7 +409,7 @@ jobs: export GIT_BASIC_PASSWORD="${{ secrets.E2E_PRIVATE_REPO_PASSWORD }}" export GIT_SSH_PRIVATE_KEY="${{ secrets.E2E_PRIVATE_REPO_PRIVATE_KEY }}" - make e2e + E2E_SLSA="true" make e2e kapp delete -a kpack -y - name: Run tests with Istio diff --git a/test/slsa_test.go b/test/slsa_test.go index 5c69ddeca..a1bb6fd15 100644 --- a/test/slsa_test.go +++ b/test/slsa_test.go @@ -12,6 +12,7 @@ import ( "encoding/json" "encoding/pem" "fmt" + "os" "strings" "testing" @@ -41,9 +42,10 @@ import ( ) func TestSlsa(t *testing.T) { - t.Cleanup(func() { - fmt.Println("TestSlsa cleanup") - }) + if testSlsa, _ := os.LookupEnv("E2E_SLSA"); testSlsa != "true" { + t.Skip("E2E_SLSA not set, skipping") + } + spec.Run(t, "SLSA", testSlsaBuild) }