Skip to content

Commit

Permalink
test: skip resize check in migration test
Browse files Browse the repository at this point in the history
test: skip resize e2e test in migration test
  • Loading branch information
andyzhangx committed Aug 7, 2020
1 parent 0f72bd2 commit ed6b5fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/e2e/dynamic_provisioning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ func (t *dynamicProvisioningTestSuite) defineTests(isMultiZone bool) {
CSIDriver: testDriver,
Volume: volume,
StorageClassParameters: map[string]string{"skuName": "Standard_LRS"},
IsTestingMigration: isTestingMigration,
}
test.Run(cs, ns)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ type DynamicallyProvisionedResizeVolumeTest struct {
CSIDriver driver.DynamicPVTestDriver
StorageClassParameters map[string]string
Volume VolumeDetails
IsTestingMigration bool
}

func (t *DynamicallyProvisionedResizeVolumeTest) Run(client clientset.Interface, namespace *v1.Namespace) {
Expand Down Expand Up @@ -89,7 +90,7 @@ func (t *DynamicallyProvisionedResizeVolumeTest) Run(client clientset.Interface,
ginkgo.By("checking the resizing PV result")
newPv, _ := client.CoreV1().PersistentVolumes().Get(context.Background(), newPvc.Spec.VolumeName, metav1.GetOptions{})
newPvSize := newPv.Spec.Capacity["storage"]
if !newSize.Equal(newPvSize) {
if !newSize.Equal(newPvSize) && !t.IsTestingMigration {
ginkgo.By(fmt.Sprintf("newPVCSize(%+v) is not equal to newPVSize(%+v)", newSize.String(), newPvSize.String()))
}

Expand Down Expand Up @@ -117,7 +118,7 @@ func (t *DynamicallyProvisionedResizeVolumeTest) Run(client clientset.Interface,
disktest, err := disksClient.Get(context.Background(), resourceGroup, diskName)
framework.ExpectNoError(err, fmt.Sprintf("Error getting disk for azuredisk %v", err))
newdiskSize := strconv.Itoa(int(*disktest.DiskSizeGB)) + "Gi"
if !(newSize.String() == newdiskSize) {
if !(newSize.String() == newdiskSize) && !t.IsTestingMigration {
framework.Failf("newPVCSize(%+v) is not equal to new azurediskSize(%+v)", newSize.String(), newdiskSize)
}

Expand Down

0 comments on commit ed6b5fa

Please sign in to comment.