Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 13 additions & 20 deletions test/extended/networking/route_advertisements.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,6 @@ var _ = g.Describe("[sig-network][OCPFeatureGate:RouteAdvertisements][Feature:Ro

var err error
var snifferPodsNodes []string
// Check if the cluster is in local gateway mode
network, err := oc.AdminOperatorClient().OperatorV1().Networks().Get(context.TODO(), "cluster", metav1.GetOptions{})
o.Expect(err).NotTo(o.HaveOccurred())
if network.Spec.DefaultNetwork.OVNKubernetesConfig.GatewayConfig != nil && network.Spec.DefaultNetwork.OVNKubernetesConfig.GatewayConfig.RoutingViaHost && testCUDNTopology == "layer2" {
// TODO: unskip once CORENET-5881 is done.
skipper.Skipf("Skipping Layer2 UDN advertisements test for local gateway mode")
}
if testCUDNTopology == "layer2" {
// Running the packet sniffer on all nodes in the cluster for Layer2 UDN
nodes, err := clientset.CoreV1().Nodes().List(context.TODO(), metav1.ListOptions{})
Expand Down Expand Up @@ -469,7 +462,6 @@ var _ = g.Describe("[sig-network][OCPFeatureGate:RouteAdvertisements][Feature:Ro
err := runOcWithRetryIgnoreOutput(oc.AsAdmin(), "delete", "deploy", deployName)
errors.Join(err, runOcWithRetryIgnoreOutput(oc.AsAdmin(), "delete", "pod", "--all"))
errors.Join(err, runOcWithRetryIgnoreOutput(oc.AsAdmin().WithoutNamespace(), "delete", "ra", testCUDNName))
errors.Join(err, runOcWithRetryIgnoreOutput(oc.AsAdmin().WithoutNamespace(), "delete", "ra", testCUDNName))
errors.Join(err, runOcWithRetryIgnoreOutput(oc.AsAdmin().WithoutNamespace(), "delete", "clusteruserdefinednetwork", testCUDNName))
errors.Join(err, deallocateSubnets(oc, userDefinedNetworkIPv4Subnet, userDefinedNetworkIPv6Subnet))
cleanup()
Expand Down Expand Up @@ -516,18 +508,20 @@ var _ = g.Describe("[sig-network][OCPFeatureGate:RouteAdvertisements][Feature:Ro
o.Eventually(workaroundOCPBUGS56488).WithArguments(oc).WithTimeout(3 * time.Minute).WithPolling(5 * time.Second).Should(o.BeTrue())
})

g.AfterEach(func() {
o.Expect(func() error {
err := runOcWithRetryIgnoreOutput(oc.AsAdmin(), "delete", "nncp", "extranet")
errors.Join(err, afterEach())
return err
}()).To(o.Succeed())
})

test := func(topology string) {
// general prerequisites
beforeEach(vrfLiteCUDNName, "auto", topology, vrfLiteSnifferInterface)

// cleanup the VRF-Lite configuration
defer func() {
o.Expect(func() error {
err := runOcWithRetryIgnoreOutput(oc.AsAdmin(), "delete", "nncp", "extranet")
errors.Join(err, afterEach())
errors.Join(err, runOcWithRetryIgnoreOutput(oc.AsAdmin(), "delete", "ds", packetSnifferDaemonSet.Name, "-n", snifferNamespace))
return err
}()).To(o.Succeed())
}()

// we shouldn't need to do this but we have to because of
// https://issues.redhat.com/browse/RHEL-89914
// recycle the VRF until it becomes managed
Expand Down Expand Up @@ -563,12 +557,11 @@ var _ = g.Describe("[sig-network][OCPFeatureGate:RouteAdvertisements][Feature:Ro

// All VRF-Lite checks for 'vrfLiteCUDNName' need to happen on a
// single test (or otherwise we should resort to a serial job)
// This test has a long timeout due to its serial nature and also
// because of OCPBUGS-56488
// This test has a long timeout due to its serial nature, testing both
// Layer 3 and Layer 2 topologies serially, and also because of OCPBUGS-56488
g.It("Pods should be able to communicate on a secondary network [Timeout:30m]", func() {
g.By("testing with a layer 3 CUDN", func() { test("layer3") })
// TODO: Add test for layer 2 UDN once CORENET-5881 is done.
//g.By("testing with a layer 2 CUDN", func() { test("layer2") })
g.By("testing with a layer 2 CUDN", func() { test("layer2") })
})
})
})
Expand Down