Skip to content

Commit 026fcb6

Browse files
committed
Compute the namespace when the test actually runs
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
1 parent dac9999 commit 026fcb6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/e2e/setup_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ func createEndPointPickerHelper(eppConfig string, replicas int, isLeaderElection
230230
// to inject the setup and teardown code.
231231
func testWrapper(test func()) func() {
232232
var (
233-
nsName = getNamespace()
233+
nsName string
234234
createdNameSpace bool
235235

236236
rbacObjects []string
@@ -241,6 +241,7 @@ func testWrapper(test func()) func() {
241241
)
242242
return func() {
243243
ginkgo.BeforeAll(func() {
244+
nsName = getNamespace()
244245
createdNameSpace = setupNameSpace()
245246

246247
envoyObjects, portForwardSession = createEnvoy(nsName)
@@ -278,7 +279,7 @@ func testWrapper(test func()) func() {
278279
testutils.DeleteObjects(testConfig, envoyObjects, nsName)
279280

280281
if createdNameSpace {
281-
deleteNameSpace(getNamespace())
282+
deleteNameSpace(nsName)
282283
}
283284
} else {
284285
// The test failed

0 commit comments

Comments
 (0)