Skip to content

Commit

Permalink
Merge pull request #2098 from andyzhangx/fix-multi-az-test
Browse files Browse the repository at this point in the history
test: fix multi-zone test failure on capz multi-zone cluster
  • Loading branch information
andyzhangx committed Nov 30, 2023
2 parents 19cc77f + 5d13fc3 commit 13c3ff8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/e2e/dynamic_provisioning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (t *dynamicProvisioningTestSuite) defineTests(isMultiZone bool) {
},
}

if isMultiZone && !isUsingInTreeVolumePlugin {
if isMultiZone && !isUsingInTreeVolumePlugin && !isCapzTest {
test.StorageClassParameters = map[string]string{
"skuName": "UltraSSD_LRS",
"cachingmode": "None",
Expand All @@ -154,7 +154,7 @@ func (t *dynamicProvisioningTestSuite) defineTests(isMultiZone bool) {
pods := []testsuites.PodDetails{
{
Cmd: convertToPowershellorCmdCommandIfNecessary("echo 'hello world' > /mnt/test-1/data && grep 'hello world' /mnt/test-1/data"),
Volumes: []testsuites.VolumeDetails{
Volumes: t.normalizeVolumes([]testsuites.VolumeDetails{
{
ClaimSize: "10Gi",
VolumeMount: testsuites.VolumeMountDetails{
Expand All @@ -163,7 +163,7 @@ func (t *dynamicProvisioningTestSuite) defineTests(isMultiZone bool) {
},
VolumeAccessMode: v1.ReadWriteOnce,
},
},
}, isMultiZone),
IsWindows: isWindowsCluster,
WinServerVer: winServerVer,
},
Expand Down Expand Up @@ -1272,6 +1272,9 @@ func (t *dynamicProvisioningTestSuite) defineTests(isMultiZone bool) {
skipIfTestingInWindowsCluster()
if isMultiZone {
skipIfNotZRSSupported()
if isCapzTest {
ginkgo.Skip("skip shared disk multi zone test on capz cluster")
}
}

pod := testsuites.PodDetails{
Expand Down
1 change: 1 addition & 0 deletions test/e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ var (
winServerVer = os.Getenv(testWinServerVerEnvVar)
isAzureStackCloud = strings.EqualFold(os.Getenv(cloudNameEnvVar), "AZURESTACKCLOUD")
isWindowsHPCDeployment = strings.EqualFold(os.Getenv("WINDOWS_USE_HOST_PROCESS_CONTAINERS"), "true")
isCapzTest = os.Getenv("NODE_MACHINE_TYPE") != ""
location string
supportsZRS bool
supportsDynamicResize bool
Expand Down

0 comments on commit 13c3ff8

Please sign in to comment.