Skip to content

Commit

Permalink
Use Gingko spec labels in E2E tests
Browse files Browse the repository at this point in the history
...to explicitly categorize them rather than prepending a string to the
the spec description.

Also, label certain tests as "basic" as outlined in
submariner-io/subctl#697

Signed-off-by: Tom Pantelis <[email protected]>
  • Loading branch information
tpantelis committed Oct 17, 2023
1 parent d178aeb commit 95d6c00
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 21 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ require (
github.com/coreos/go-iptables v0.7.0
github.com/emirpasic/gods v1.18.1
github.com/kelseyhightower/envconfig v1.4.0
github.com/onsi/ginkgo/v2 v2.12.0
github.com/onsi/gomega v1.27.10
github.com/onsi/ginkgo/v2 v2.13.0
github.com/onsi/gomega v1.28.0
github.com/ovn-org/libovsdb v0.6.1-0.20220427123326-d7b273399db4
github.com/ovn-org/ovn-kubernetes/go-controller v0.0.0-20220511131059-ac1ce4691c0f
github.com/pkg/errors v0.9.1
github.com/projectcalico/api v0.0.0-20230602153125-fb7148692637
github.com/prometheus-community/pro-bing v0.3.0
github.com/prometheus/client_golang v1.17.0
github.com/submariner-io/admiral v0.16.0-m4.0.20231010063642-6d040ab176ec
github.com/submariner-io/shipyard v0.16.0-m4
github.com/submariner-io/shipyard v0.16.0-m4.0.20231017114407-11b7ad52c6a4
github.com/uw-labs/lichen v0.1.7
github.com/vishvananda/netlink v1.2.1-beta.2
golang.org/x/sys v0.13.0
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -389,15 +389,15 @@ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc=
github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI=
github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ=
github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4=
github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
github.com/onsi/gomega v1.28.0 h1:i2rg/p9n/UqIDAMFUJ6qIUUMcsqOuUHgbpbu235Vr1c=
github.com/onsi/gomega v1.28.0/go.mod h1:A1H2JE76sI14WIP57LMKj7FVfCHx3g3BcZVjJG8bjX8=
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0=
Expand Down Expand Up @@ -506,8 +506,8 @@ github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/submariner-io/admiral v0.16.0-m4.0.20231010063642-6d040ab176ec h1:7ogpjwi+XpSPhLf8FNWsREXVZeOK1csnUSu4MLaCXG0=
github.com/submariner-io/admiral v0.16.0-m4.0.20231010063642-6d040ab176ec/go.mod h1:Zb/vxLUvvPivyyL3wSYadlyWRGNc5hRuk5NRCGHlt2g=
github.com/submariner-io/shipyard v0.16.0-m4 h1:UhxS3w3C+c2kVUrJVH4VMjbhkrgTjzo8oPlo/ANbjvI=
github.com/submariner-io/shipyard v0.16.0-m4/go.mod h1:4brXpjvD+OL3/hd8+laET47FeoOsQzkQ74aprhEyfhE=
github.com/submariner-io/shipyard v0.16.0-m4.0.20231017114407-11b7ad52c6a4 h1:toajDp31eWHV2cL+oFdKVdZrrcojX7EC5HcpG5/Qjj8=
github.com/submariner-io/shipyard v0.16.0-m4.0.20231017114407-11b7ad52c6a4/go.mod h1:1zPFbxQbgZZXvV2rukb1EliGog4+OlAEhbU5aLHwpXA=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
Expand Down
4 changes: 3 additions & 1 deletion test/e2e/compliance/fips.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ import (
subFramework "github.com/submariner-io/submariner/test/e2e/framework"
)

var _ = Describe("[compliance] FIPS", func() {
const TestLabel = "compliance"

var _ = Describe("FIPS", Label(TestLabel), func() {
f := subFramework.NewFramework("fips-gateway-status")

When("FIPS mode is enabled for the active gateway node", func() {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/dataplane/gateway_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

var _ = Describe("[dataplane] Gateway status reporting", func() {
var _ = Describe("Gateway status reporting", Label(TestLabel), func() {
f := subFramework.NewFramework("dataplane-gateway-status")

When("a gateway node is configured", func() {
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/dataplane/tcp_gn_pod_connectivity.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
subFramework "github.com/submariner-io/submariner/test/e2e/framework"
)

var _ = Describe("[dataplane-globalnet] Basic TCP connectivity tests across overlapping clusters without discovery", func() {
var _ = Describe("Basic TCP connectivity tests across overlapping clusters without discovery", Label(TestLabel, "globalnet"), func() {
f := framework.NewFramework("dataplane-gn-conn-nd")
var toEndpointType tcp.EndpointType
var networking framework.NetworkingType
Expand Down Expand Up @@ -66,15 +66,15 @@ var _ = Describe("[dataplane-globalnet] Basic TCP connectivity tests across over
toCluster = framework.ClusterB
})

When("the pod is not on a gateway and the remote service is not on a gateway", func() {
When("the pod is not on a gateway and the remote service is not on a gateway", Label(framework.BasicTestLabel), func() {
verifyInteraction(framework.NonGatewayNode, framework.NonGatewayNode)
})

When("the pod is on a gateway and the remote service is not on a gateway", func() {
verifyInteraction(framework.GatewayNode, framework.NonGatewayNode)
})

When("the pod is on a gateway and the remote service is on a gateway", func() {
When("the pod is on a gateway and the remote service is on a gateway", Label(framework.BasicTestLabel), func() {
verifyInteraction(framework.GatewayNode, framework.GatewayNode)
})
})
Expand Down
12 changes: 7 additions & 5 deletions test/e2e/dataplane/tcp_pod_connectivity.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import (
subFramework "github.com/submariner-io/submariner/test/e2e/framework"
)

var _ = Describe("[dataplane] Basic TCP connectivity tests across clusters without discovery", func() {
const TestLabel = "dataplane"

var _ = Describe("Basic TCP connectivity tests across clusters without discovery", Label(TestLabel), func() {
f := framework.NewFramework("dataplane-conn-nd")
var toEndpointType tcp.EndpointType
var networking framework.NetworkingType
Expand Down Expand Up @@ -64,7 +66,7 @@ var _ = Describe("[dataplane] Basic TCP connectivity tests across clusters witho
toCluster = framework.ClusterB
})

When("the pod is not on a gateway and the remote pod is not on a gateway", func() {
When("the pod is not on a gateway and the remote pod is not on a gateway", Label(framework.BasicTestLabel), func() {
verifyInteraction(framework.NonGatewayNode, framework.NonGatewayNode)
})

Expand All @@ -76,7 +78,7 @@ var _ = Describe("[dataplane] Basic TCP connectivity tests across clusters witho
verifyInteraction(framework.GatewayNode, framework.NonGatewayNode)
})

When("the pod is on a gateway and the remote pod is on a gateway", func() {
When("the pod is on a gateway and the remote pod is on a gateway", Label(framework.BasicTestLabel), func() {
verifyInteraction(framework.GatewayNode, framework.GatewayNode)
})
})
Expand All @@ -89,7 +91,7 @@ var _ = Describe("[dataplane] Basic TCP connectivity tests across clusters witho
toCluster = framework.ClusterB
})

When("the pod is not on a gateway and the remote service is not on a gateway", func() {
When("the pod is not on a gateway and the remote service is not on a gateway", Label(framework.BasicTestLabel), func() {
verifyInteraction(framework.NonGatewayNode, framework.NonGatewayNode)
})

Expand All @@ -101,7 +103,7 @@ var _ = Describe("[dataplane] Basic TCP connectivity tests across clusters witho
verifyInteraction(framework.GatewayNode, framework.NonGatewayNode)
})

When("the pod is on a gateway and the remote service is on a gateway", func() {
When("the pod is on a gateway and the remote service is on a gateway", Label(framework.BasicTestLabel), func() {
verifyInteraction(framework.GatewayNode, framework.GatewayNode)
})
})
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/redundancy/gateway_failover.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ const (
gatewayStatusLabel = "gateway.submariner.io/status"
gatewayStatusActive = "active"
gatewayNodeLabel = "gateway.submariner.io/node"
TestLabel = "redundancy"
)

var _ = Describe("[redundancy] Gateway fail-over tests", func() {
var _ = Describe("Gateway fail-over tests", Label(TestLabel), func() {
f := subFramework.NewFramework("gateway-redundancy")

// After each test, we make sure that the system again has a single gateway, the active one
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/redundancy/route_agent_restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
v1 "k8s.io/api/core/v1"
)

var _ = Describe("[redundancy] Route Agent restart tests", func() {
var _ = Describe("Route Agent restart tests", Label(TestLabel), func() {
f := subFramework.NewFramework("route-agent-restart")

When("a route agent pod running on a gateway node is restarted", func() {
Expand Down

0 comments on commit 95d6c00

Please sign in to comment.