Skip to content

Commit

Permalink
OSSM-4453: igw route (#683)
Browse files Browse the repository at this point in the history
* igw sub testcase

* added the Jira issue link

---------

Co-authored-by: Praneeth Bajjuri <[email protected]>
  • Loading branch information
pbajjuri20 and Praneeth Bajjuri authored Apr 26, 2024
1 parent 7f2155d commit 5b6f4cf
Showing 1 changed file with 49 additions and 4 deletions.
53 changes: 49 additions & 4 deletions pkg/tests/ossm/route_prevent_additional_ingress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/maistra/maistra-test-tool/pkg/util/check/assert"
"github.com/maistra/maistra-test-tool/pkg/util/oc"
"github.com/maistra/maistra-test-tool/pkg/util/retry"
"github.com/maistra/maistra-test-tool/pkg/util/shell"
. "github.com/maistra/maistra-test-tool/pkg/util/test"
"github.com/maistra/maistra-test-tool/pkg/util/version"
Expand All @@ -17,12 +18,9 @@ func TestRoutePreventAdditionalIngress(t *testing.T) {
ER := "extra-routes"

t.Cleanup(func() {
oc.DeleteFromString(t, ER, smcp_additionalIngress)
oc.DeleteNamespace(t, "extra-routes")
oc.DeleteNamespace(t, ER)
})

DeployControlPlane(t)

t.LogStep("Create namespace")
oc.CreateNamespace(t, ER)

Expand All @@ -37,10 +35,57 @@ func TestRoutePreventAdditionalIngress(t *testing.T) {
"Ingress Route is not created",
"Ingress Route is created"))

t.NewSubTest("ingress gateway route creation").Run(func(t TestHelper) {
t.Log("Reference: https://issues.redhat.com/browse/OSSM-3909")

ER2 := "extra-routes22"

t.Cleanup(func() {
oc.DeleteNamespace(t, ER2)
})

t.LogStep("Create namespace")
oc.CreateNamespace(t, ER2)

t.LogStep("Create IGW on new namespace")
oc.ApplyString(t, ER2, smcp_igw)

t.LogStep("Verify the IGW Route")
retry.UntilSuccess(t, func(t TestHelper) {
oc.Get(t,
ER2,
"routes", "",
assert.OutputContains("igw",
"Route igw is created",
"Route igw is not created, need to check the additional ingress gateway"))
})
})
})
}

var (
smcp_igw = `
kind: ServiceMeshControlPlane
apiVersion: maistra.io/v2
metadata:
name: basic
spec:
version: v2.5
tracing:
type: Jaeger
sampling: 10000
policy:
type: Istiod
telemetry:
type: Istiod
gateways:
additionalIngress:
igw:
enabled: true
namespace: extra-routes22
ingress:
enabled: false
`
smcp_additionalIngress = `
kind: ServiceMeshControlPlane
apiVersion: maistra.io/v2
Expand Down

0 comments on commit 5b6f4cf

Please sign in to comment.