Skip to content

Commit

Permalink
TEST/MINOR: fix some unit tests and e2e tests random failures
Browse files Browse the repository at this point in the history
  • Loading branch information
hdurand0710 committed Jan 9, 2025
1 parent 455cc9b commit 43c9a24
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deploy/tests/integration/config-snippet/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package configsnippet_test

import (
"os"
"testing"

"github.com/haproxytech/kubernetes-ingress/deploy/tests/integration"
Expand Down Expand Up @@ -44,6 +45,8 @@ func (suite *DisableConfigSnippetSuite) BeforeTest(suiteName, testName string) {
suite.BaseSuite.BeforeTest(suiteName, testName)
// Add any needed update to the controller setting
// by updating suite.TestControllers[suite.T().Name()].XXXXX
os.Unsetenv("POD_NAME")
os.Unsetenv("POD_NAMESPACE")
testController := suite.TestControllers[suite.T().Name()]
testController.OSArgs.ConfigMap.Name = configMapName
testController.OSArgs.ConfigMap.Namespace = configMapNamespace
Expand Down
3 changes: 3 additions & 0 deletions deploy/tests/integration/pod-maxconn/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package podmaxconn

import (
"os"
"testing"

"github.com/haproxytech/kubernetes-ingress/deploy/tests/integration"
Expand Down Expand Up @@ -44,6 +45,8 @@ func (suite *PodMaxConnSuite) BeforeTest(suiteName, testName string) {
suite.BaseSuite.BeforeTest(suiteName, testName)
// Add any needed update to the controller setting
// by updating suite.TestControllers[suite.T().Name()].XXXXX
os.Unsetenv("POD_NAME")
os.Unsetenv("POD_NAMESPACE")
testController := suite.TestControllers[suite.T().Name()]
testController.OSArgs.ConfigMap.Name = configMapName
testController.OSArgs.ConfigMap.Namespace = configMapNamespace
Expand Down
3 changes: 3 additions & 0 deletions deploy/tests/integration/timeout-server/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package timeoutserver

import (
"os"
"testing"

"github.com/haproxytech/kubernetes-ingress/deploy/tests/integration"
Expand Down Expand Up @@ -44,6 +45,8 @@ func (suite *TimeoutServerSuite) BeforeTest(suiteName, testName string) {
suite.BaseSuite.BeforeTest(suiteName, testName)
// Add any needed update to the controller setting
// by updating suite.TestControllers[suite.T().Name()].XXXXX
os.Unsetenv("POD_NAME")
os.Unsetenv("POD_NAMESPACE")
testController := suite.TestControllers[suite.T().Name()]
testController.OSArgs.ConfigMap.Name = configMapName
testController.OSArgs.ConfigMap.Namespace = configMapNamespace
Expand Down

0 comments on commit 43c9a24

Please sign in to comment.