Skip to content

Commit

Permalink
Update TestExcludeCniFromNode test and fix IOR flaky test (#703)
Browse files Browse the repository at this point in the history
* [OSSM-6768] Update TestExcludeCniFromNode test

* [OSSM-6359] Fix IOR flaky test
  • Loading branch information
mkralik3 authored Jul 3, 2024
1 parent ad49d9d commit 7d4a966
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pkg/tests/ossm/deploy_on_infra_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ func TestExcludeCniFromNode(t *testing.T) {
}
t.Cleanup(func() {
oc.RemoveLabel(t, "", "node", workername, "maistra.io/exclude-cni")
oc.RecreateNamespace(t, meshNamespace)
})

// CNI pods are created after the control plane
DeployControlPlane(t)
workername = pickWorkerNode(t)
cniPodApp := fmt.Sprintf("istio-cni-node-v%d-%d", env.GetSMCPVersion().Major, env.GetSMCPVersion().Minor)

Expand Down
1 change: 1 addition & 0 deletions pkg/tests/ossm/initcontainer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func TestInitContainerNotRemovedDuringInjection(t *testing.T) {

t.Cleanup(func() {
oc.RecreateNamespace(t, ns.Bookinfo)
oc.RecreateNamespace(t, meshNamespace)
})

DeployControlPlane(t)
Expand Down
7 changes: 5 additions & 2 deletions pkg/tests/ossm/ior_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,17 @@ func TestIOR(t *testing.T) {
})
}

// workaround for OSSM-6767, make sure that SMCP doesn't exist from previous test run
oc.RecreateNamespace(t, meshNamespace)

DeployControlPlane(t)

t.NewSubTest("check IOR off by default v2.5").Run(func(t test.TestHelper) {
t.NewSubTest("check IOR off by default from v2.5").Run(func(t test.TestHelper) {
if env.GetSMCPVersion().LessThan(version.SMCP_2_5) {
t.Skip("Skipping until 2.5")
} else {
if getIORSetting(t, meshNamespace, meshName) != "false" {
t.Fatal("Expect to find IOR enabled by default in v2.5+, but it is currently disabled")
t.Fatal("Expect to find IOR disabled by default in v2.5+, but it is currently enabled")
} else {
t.LogSuccess("Got the expected false for IOR setting")
}
Expand Down

0 comments on commit 7d4a966

Please sign in to comment.