Skip to content

Commit

Permalink
Skip TestFQDNCacheMinTTL if cluster has Windows Nodes
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
devc007 committed Jan 10, 2025
1 parent d1cafa7 commit 8fa828b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/e2e/antreapolicy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5303,6 +5303,13 @@ func testAntreaClusterNetworkPolicyStats(t *testing.T, data *TestData) {
// by TestFQDNCacheMinTTL with 2 fqdnCacheMinTTL values where `0` represents a default value
// when fqdnCacheMinTTL is unset .
func TestFQDNCacheMinTTL(t *testing.T) {
skipIfAntreaPolicyDisabled(t)
skipIfHasWindowsNodes(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) })
}
Expand All @@ -5314,12 +5321,6 @@ func testWithFQDNCacheMinTTL(t *testing.T, fqdnCacheMinTTL int) {
dnsTTL = 5
)

skipIfAntreaPolicyDisabled(t)
skipIfHasWindowsNodes(t)
skipIfNotIPv4Cluster(t)
skipIfIPv6Cluster(t)
skipIfNotRequired(t, "mode-irrelevant")

data, err := setupTest(t)
if err != nil {
t.Fatalf("Error when setting up test: %v", err)
Expand Down

0 comments on commit 8fa828b

Please sign in to comment.