fix test failure

This commit is contained in:
andyzhangx 2020-02-24 02:43:37 +00:00
parent e5bb6af475
commit 0e3b7a7aea

View File

@ -429,10 +429,13 @@ func TestGetValidCreationData(t *testing.T) {
}
func TestCheckDiskExists(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
ctx, cancel := getContextWithCancel()
defer cancel()
testCloud := GetTestCloud()
testCloud := GetTestCloud(ctrl)
common := &controllerCommon{
location: testCloud.Location,
storageEndpointSuffix: testCloud.Environment.StorageEndpointSuffix,
@ -480,10 +483,13 @@ func TestCheckDiskExists(t *testing.T) {
}
func TestFilterNonExistingDisks(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
ctx, cancel := getContextWithCancel()
defer cancel()
testCloud := GetTestCloud()
testCloud := GetTestCloud(ctrl)
common := &controllerCommon{
location: testCloud.Location,
storageEndpointSuffix: testCloud.Environment.StorageEndpointSuffix,