From 62dbfce1d0a22fbfc0d2e90029960e07af667e83 Mon Sep 17 00:00:00 2001 From: devesh Date: Sat, 11 Jan 2025 14:31:25 +0530 Subject: [PATCH] Skip TestFQDNCacheMinTTL if cluster has Windows Nodes. Fixes #6891 The TestFQDNCacheMinTTL e2e test currently does not support Windows. We skip it if any Node in the test cluster is a Windows Node, which is also consistent with other AntreaPolicy e2e tests. As @antoninbas suggested, I have relocated the skipX condition to the beginning of TestFQDNCacheMinTTL. Now, the skip condition will execute before any subset of TestFQDNCacheMinTTL, making testWithFQDNCacheMinTTL shorter and possibly more efficient. --- test/e2e/antreapolicy_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/e2e/antreapolicy_test.go b/test/e2e/antreapolicy_test.go index 5f4eca551d4..77bf980e7f9 100644 --- a/test/e2e/antreapolicy_test.go +++ b/test/e2e/antreapolicy_test.go @@ -5308,12 +5308,13 @@ func TestFQDNCacheMinTTL(t *testing.T) { skipIfNotIPv4Cluster(t) skipIfIPv6Cluster(t) skipIfNotRequired(t, "mode-irrelevant") - + t.Run("minTTLUnset", func(t *testing.T) { testWithFQDNCacheMinTTL(t, 0) }) t.Run("minTTL20s", func(t *testing.T) { testWithFQDNCacheMinTTL(t, 20) }) } func testWithFQDNCacheMinTTL(t *testing.T, fqdnCacheMinTTL int) { + const ( testFQDN = "fqdn-test-pod.lfx.test" dnsPort = 53