From bce5c2e5fa5bf475157849f5b3068e8cb5b521b0 Mon Sep 17 00:00:00 2001 From: Lan Date: Thu, 20 Jun 2024 18:45:22 +0800 Subject: [PATCH] Skip IPSec/WireGuard e2e test when the Multicast feature is enabled (#6264) (#6466) This is an e2e fix because of PR #5920. Signed-off-by: Lan Luo --- test/e2e/fixtures.go | 10 ++++++++++ test/e2e/ipsec_test.go | 1 + test/e2e/wireguard_test.go | 1 + 3 files changed, 12 insertions(+) diff --git a/test/e2e/fixtures.go b/test/e2e/fixtures.go index 45af883bccd..15053db6b9b 100644 --- a/test/e2e/fixtures.go +++ b/test/e2e/fixtures.go @@ -148,6 +148,16 @@ func skipIfNoVMs(tb testing.TB) { } } +func skipIfMulticastEnabled(tb testing.TB, data *TestData) { + agentConf, err := data.GetAntreaAgentConf() + if err != nil { + tb.Fatalf("Error getting option multicast.enable value") + } + if agentConf.Multicast.Enable { + tb.Skipf("Skipping test because option multicast.enable is true") + } +} + func skipIfFeatureDisabled(tb testing.TB, feature featuregate.Feature, checkAgent bool, checkController bool) { if checkAgent { if featureGate, err := GetAgentFeatures(); err != nil { diff --git a/test/e2e/ipsec_test.go b/test/e2e/ipsec_test.go index 417a6e382a5..d572e8ad52d 100644 --- a/test/e2e/ipsec_test.go +++ b/test/e2e/ipsec_test.go @@ -41,6 +41,7 @@ func TestIPSec(t *testing.T) { t.Fatalf("Error when setting up test: %v", err) } defer teardownTest(t, data) + skipIfMulticastEnabled(t, data) t.Logf("Redeploy Antrea with IPsec tunnel enabled") data.redeployAntrea(t, deployAntreaIPsec) diff --git a/test/e2e/wireguard_test.go b/test/e2e/wireguard_test.go index b4f3d7b5245..2ef8ec70d49 100644 --- a/test/e2e/wireguard_test.go +++ b/test/e2e/wireguard_test.go @@ -40,6 +40,7 @@ func TestWireGuard(t *testing.T) { t.Fatalf("Error when setting up test: %v", err) } defer teardownTest(t, data) + skipIfMulticastEnabled(t, data) skipIfEncapModeIsNot(t, data, config.TrafficEncapModeEncap) for _, node := range clusterInfo.nodes { skipIfMissingKernelModule(t, data, node.name, []string{"wireguard"})