From 5d24d0efe3a1cd5986fa923e6dcd40d54a7bf08b Mon Sep 17 00:00:00 2001 From: Tom Pantelis Date: Tue, 10 Oct 2023 11:05:21 -0400 Subject: [PATCH] Use Gingko spec labels in E2E tests ...to explicitly categorize them rather than prepending a string to the the spec description. Also, label certain tests as "basic" as outlined in https://github.com/submariner-io/subctl/issues/697 Signed-off-by: Tom Pantelis --- go.mod | 6 +++--- go.sum | 12 ++++++------ test/e2e/compliance/fips.go | 4 +++- test/e2e/dataplane/gateway_status.go | 2 +- test/e2e/dataplane/tcp_gn_pod_connectivity.go | 6 +++--- test/e2e/dataplane/tcp_pod_connectivity.go | 12 +++++++----- test/e2e/redundancy/gateway_failover.go | 3 ++- test/e2e/redundancy/route_agent_restart.go | 2 +- 8 files changed, 26 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index b8da9c1f5..529e5a657 100644 --- a/go.mod +++ b/go.mod @@ -7,8 +7,8 @@ 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 @@ -16,7 +16,7 @@ require ( 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 diff --git a/go.sum b/go.sum index 99e1fcbe1..4dd87d113 100644 --- a/go.sum +++ b/go.sum @@ -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= @@ -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= diff --git a/test/e2e/compliance/fips.go b/test/e2e/compliance/fips.go index 8a744b4c8..e97fe430c 100644 --- a/test/e2e/compliance/fips.go +++ b/test/e2e/compliance/fips.go @@ -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() { diff --git a/test/e2e/dataplane/gateway_status.go b/test/e2e/dataplane/gateway_status.go index 70ffa8d72..0159f2d87 100644 --- a/test/e2e/dataplane/gateway_status.go +++ b/test/e2e/dataplane/gateway_status.go @@ -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() { diff --git a/test/e2e/dataplane/tcp_gn_pod_connectivity.go b/test/e2e/dataplane/tcp_gn_pod_connectivity.go index f50a94aec..109b3043e 100644 --- a/test/e2e/dataplane/tcp_gn_pod_connectivity.go +++ b/test/e2e/dataplane/tcp_gn_pod_connectivity.go @@ -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 @@ -66,7 +66,7 @@ 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) }) @@ -74,7 +74,7 @@ var _ = Describe("[dataplane-globalnet] Basic TCP connectivity tests across over 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) }) }) diff --git a/test/e2e/dataplane/tcp_pod_connectivity.go b/test/e2e/dataplane/tcp_pod_connectivity.go index f941690f5..0736f2492 100644 --- a/test/e2e/dataplane/tcp_pod_connectivity.go +++ b/test/e2e/dataplane/tcp_pod_connectivity.go @@ -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 @@ -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) }) @@ -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) }) }) @@ -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) }) @@ -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) }) }) diff --git a/test/e2e/redundancy/gateway_failover.go b/test/e2e/redundancy/gateway_failover.go index b6096bee3..3d7f6c3f1 100644 --- a/test/e2e/redundancy/gateway_failover.go +++ b/test/e2e/redundancy/gateway_failover.go @@ -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 diff --git a/test/e2e/redundancy/route_agent_restart.go b/test/e2e/redundancy/route_agent_restart.go index cbcc84af6..2595c5d0f 100644 --- a/test/e2e/redundancy/route_agent_restart.go +++ b/test/e2e/redundancy/route_agent_restart.go @@ -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() {