From 89bf0022d6ea890678af48e98b31b95278963a29 Mon Sep 17 00:00:00 2001 From: Arsh Sharma Date: Mon, 2 Aug 2021 16:22:51 +0530 Subject: [PATCH] changes from pair programming sesh Signed-off-by: Arsh Sharma --- test/e2e/suite/conformance/certificates/acme/acme.go | 1 - test/e2e/suite/conformance/certificates/suite.go | 7 ------- test/e2e/suite/conformance/certificates/tests.go | 8 +++++++- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/test/e2e/suite/conformance/certificates/acme/acme.go b/test/e2e/suite/conformance/certificates/acme/acme.go index d6f50d293..ed9a6c328 100644 --- a/test/e2e/suite/conformance/certificates/acme/acme.go +++ b/test/e2e/suite/conformance/certificates/acme/acme.go @@ -129,7 +129,6 @@ func runACMEIssuerTests(eab *cmacme.ACMEExternalAccountBinding) { CreateIssuerFunc: provisionerPACMEHTTP01.createPublicACMEServerStagingHTTP01Issuer, DeleteIssuerFunc: provisionerPACMEHTTP01.delete, UnsupportedFeatures: unsupportedHTTP01Features.Copy().Add(unsupportedPublicACMEServerFeatures.List()...), - Skip: true, }).Define() } diff --git a/test/e2e/suite/conformance/certificates/suite.go b/test/e2e/suite/conformance/certificates/suite.go index 0e93d42a7..c4e51a745 100644 --- a/test/e2e/suite/conformance/certificates/suite.go +++ b/test/e2e/suite/conformance/certificates/suite.go @@ -68,9 +68,6 @@ type Suite struct { // completed is used internally to track whether Complete() has been called completed bool - - // Skip if set to true allows skipping the suite. Default value is false. - Skip bool } // complete will validate configuration and set default values. @@ -96,10 +93,6 @@ func (s *Suite) complete(f *framework.Framework) { // it is called by the tests to in Define() to setup and run the test func (s *Suite) it(f *framework.Framework, name string, fn func(cmmeta.ObjectReference), requiredFeatures ...featureset.Feature) { - if s.Skip { - fmt.Fprintln(GinkgoWriter, "skipping cause suite.Skip was set to true") - return - } if !s.checkFeatures(requiredFeatures...) { fmt.Fprintln(GinkgoWriter, "skipping case due to unsupported features") return diff --git a/test/e2e/suite/conformance/certificates/tests.go b/test/e2e/suite/conformance/certificates/tests.go index dd5f415bf..6ca4e4ac2 100644 --- a/test/e2e/suite/conformance/certificates/tests.go +++ b/test/e2e/suite/conformance/certificates/tests.go @@ -18,6 +18,7 @@ package certificates import ( "context" + "strings" "time" . "github.com/onsi/ginkgo" @@ -52,10 +53,15 @@ func (s *Suite) Define() { // Wrap this in a BeforeEach else flags will not have been parsed and // f.Config will not be populated at the time that this code is run. BeforeEach(func() { + // Special case Public ACME Servers against being run in the standard + // e2e tests. + if strings.Contains(s.Name, "Public ACME Server") && strings.Contains(f.Config.Addons.ACMEServer.URL, "pebble") { + Skip("Not running public ACME tests against local cluster.") + return + } if s.completed { return } - s.complete(f) if s.UseIngressIPAddress {