From 35dc8692b4e18fe11df5ad6479a147d64ec6140b Mon Sep 17 00:00:00 2001 From: James Munnelly Date: Wed, 4 Sep 2019 12:23:43 +0100 Subject: [PATCH] Fix completing suite config Signed-off-by: James Munnelly --- test/e2e/suite/conformance/certificates/suite.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/e2e/suite/conformance/certificates/suite.go b/test/e2e/suite/conformance/certificates/suite.go index 589be21d3..c6b822256 100644 --- a/test/e2e/suite/conformance/certificates/suite.go +++ b/test/e2e/suite/conformance/certificates/suite.go @@ -91,9 +91,14 @@ func (s *Suite) complete(f *framework.Framework) { func (s *Suite) Define() { Describe("with issuer type "+s.Name, func() { f := framework.NewDefaultFramework("certificates") - if !s.completed { - s.complete(f) - } + + // wrap this in a BeforeEach else flags will not have been parsed at + // the time that the `complete` function is called. + BeforeEach(func() { + if !s.completed { + s.complete(f) + } + }) By("Running test suite with the following unsupported features: " + s.UnsupportedFeatures.String()) ctx := context.Background()