Skip to content

Commit

Permalink
Merge pull request #247 from weizhouapache/e2e-fix-disk_offering_test
Browse files Browse the repository at this point in the history
e2e: fix disk_offering_test.go
  • Loading branch information
k8s-ci-robot authored May 23, 2023
2 parents 242e3ad + 3884bf4 commit 072e1dc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/e2e/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,17 @@ func CheckDiskOfferingOfVmInstances(client *cloudstack.CloudStackClient, cluster
}
for _, vm := range listResp.VirtualMachines {
if strings.Contains(vm.Name, clusterName) {
Expect(vm.Diskofferingname).To(Equal(diskOfferingName))
p := client.Volume.NewListVolumesParams()
p.SetVirtualmachineid(vm.Id)
volResp, err := client.Volume.ListVolumes(p)
if err != nil {
Fail(fmt.Sprintf("Failed to list volumes for VM instance %s", vm.Id))
}
for _, vol := range volResp.Volumes {
if strings.Contains(vol.Name, DataVolumePrefix) {
Expect(vol.Diskofferingname).To(Equal(diskOfferingName))
}
}
}
}
}
Expand Down

0 comments on commit 072e1dc

Please sign in to comment.