Skip to content

Commit 0e3b7a7

Browse files
committed
fix test failure
1 parent e5bb6af commit 0e3b7a7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common_test.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,13 @@ func TestGetValidCreationData(t *testing.T) {
429429
}
430430

431431
func TestCheckDiskExists(t *testing.T) {
432+
ctrl := gomock.NewController(t)
433+
defer ctrl.Finish()
434+
432435
ctx, cancel := getContextWithCancel()
433436
defer cancel()
434437

435-
testCloud := GetTestCloud()
438+
testCloud := GetTestCloud(ctrl)
436439
common := &controllerCommon{
437440
location: testCloud.Location,
438441
storageEndpointSuffix: testCloud.Environment.StorageEndpointSuffix,
@@ -480,10 +483,13 @@ func TestCheckDiskExists(t *testing.T) {
480483
}
481484

482485
func TestFilterNonExistingDisks(t *testing.T) {
486+
ctrl := gomock.NewController(t)
487+
defer ctrl.Finish()
488+
483489
ctx, cancel := getContextWithCancel()
484490
defer cancel()
485491

486-
testCloud := GetTestCloud()
492+
testCloud := GetTestCloud(ctrl)
487493
common := &controllerCommon{
488494
location: testCloud.Location,
489495
storageEndpointSuffix: testCloud.Environment.StorageEndpointSuffix,

0 commit comments

Comments
 (0)