From 4624d3922c6fc8769c0e4949b84c473546cc8085 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Tue, 20 Sep 2022 09:58:19 -0700 Subject: [PATCH] add registry cache capability to upgradecluster_test.go Signed-off-by: Derek Nola --- tests/e2e/upgradecluster/upgradecluster_test.go | 5 ++++- tests/e2e/validatecluster/validatecluster_test.go | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/e2e/upgradecluster/upgradecluster_test.go b/tests/e2e/upgradecluster/upgradecluster_test.go index e5f30c3304..df56a97529 100644 --- a/tests/e2e/upgradecluster/upgradecluster_test.go +++ b/tests/e2e/upgradecluster/upgradecluster_test.go @@ -19,8 +19,11 @@ var nodeOS = flag.String("nodeOS", "generic/ubuntu2004", "VM operating system") var serverCount = flag.Int("serverCount", 3, "number of server nodes") var agentCount = flag.Int("agentCount", 2, "number of agent nodes") var hardened = flag.Bool("hardened", false, "true or false") +var ci = flag.Bool("ci", false, "running on CI") // Environment Variables Info: +// E2E_REGISTRY: true/false (default: false) +// Controls which K3s version is installed first, upgrade is always to latest commit // E2E_RELEASE_VERSION=v1.23.3+k3s1 // OR // E2E_RELEASE_CHANNEL=(commit|latest|stable), commit pulls latest commit from master @@ -379,7 +382,7 @@ var _ = AfterEach(func() { }) var _ = AfterSuite(func() { - if failed { + if failed && !*ci { fmt.Println("FAILED!") } else { Expect(e2e.DestroyCluster()).To(Succeed()) diff --git a/tests/e2e/validatecluster/validatecluster_test.go b/tests/e2e/validatecluster/validatecluster_test.go index bf57e03d0d..62d465f91d 100644 --- a/tests/e2e/validatecluster/validatecluster_test.go +++ b/tests/e2e/validatecluster/validatecluster_test.go @@ -25,6 +25,7 @@ var local = flag.Bool("local", false, "deploy a locally built K3s binary") // Environment Variables Info: // E2E_EXTERNAL_DB: mysql, postgres, etcd (default: etcd) // E2E_RELEASE_VERSION=v1.23.1+k3s2 (default: latest commit from master) +// E2E_REGISTRY: true/false (default: false) func Test_E2EClusterValidation(t *testing.T) { RegisterFailHandler(Fail)