diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common_test.go index 8ab593b6b19..4a50e5f5376 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common_test.go @@ -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,