From f0b248ee4d4210a8cbe92ddad5a17779439fa358 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Mon, 9 Oct 2023 02:42:13 +0000 Subject: [PATCH] test: skip anti-affinity in hpc deployment test --- test/e2e/dynamic_provisioning_test.go | 1 + .../dynamically_provisioned_volume_snapshot_tester.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/e2e/dynamic_provisioning_test.go b/test/e2e/dynamic_provisioning_test.go index b49ff4a150..8d9875080f 100644 --- a/test/e2e/dynamic_provisioning_test.go +++ b/test/e2e/dynamic_provisioning_test.go @@ -747,6 +747,7 @@ func (t *dynamicProvisioningTestSuite) defineTests(isMultiZone bool) { CSIDriver: testDriver, Pod: pod, ShouldOverwrite: false, + IsWindowsHPCDeployment: isWindowsHPCDeployment, PodWithSnapshot: podWithSnapshot, StorageClassParameters: map[string]string{"skuName": "StandardSSD_LRS"}, SnapshotStorageClassParameters: map[string]string{ diff --git a/test/e2e/testsuites/dynamically_provisioned_volume_snapshot_tester.go b/test/e2e/testsuites/dynamically_provisioned_volume_snapshot_tester.go index 78f5dfd587..7bdb026a07 100644 --- a/test/e2e/testsuites/dynamically_provisioned_volume_snapshot_tester.go +++ b/test/e2e/testsuites/dynamically_provisioned_volume_snapshot_tester.go @@ -49,6 +49,7 @@ type DynamicallyProvisionedVolumeSnapshotTest struct { PodWithSnapshot PodDetails StorageClassParameters map[string]string SnapshotStorageClassParameters map[string]string + IsWindowsHPCDeployment bool } func (t *DynamicallyProvisionedVolumeSnapshotTest) Run(ctx context.Context, client clientset.Interface, restclient restclientset.Interface, namespace *v1.Namespace) { @@ -132,7 +133,7 @@ func (t *DynamicallyProvisionedVolumeSnapshotTest) Run(ctx context.Context, clie defer tPodWithSnapshotCleanup[i](ctx) } - if t.ShouldOverwrite { + if t.ShouldOverwrite && !t.IsWindowsHPCDeployment { // TODO: add test case which will schedule the original disk and the copied disk on the same node once the conflicting UUID issue is fixed. ginkgo.By("Set pod anti-affinity to make sure two pods are scheduled on different nodes") tPodWithSnapshot.SetAffinity(&TestPodAntiAffinity)