Skip to content

Commit

Permalink
Skip TestFQDNCacheMinTTL if cluster has Windows Nodes. Fixes antrea-i…
Browse files Browse the repository at this point in the history
…o#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.
  • Loading branch information
devc007 committed Jan 11, 2025
1 parent 310e1e9 commit 62dbfce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/e2e/antreapolicy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 62dbfce

Please sign in to comment.