Skip to content

Commit f2c9be3

Browse files
andyzhangxk8s-infra-cherrypick-robot
authored and
k8s-infra-cherrypick-robot
committed
test: fix test
1 parent 1832e81 commit f2c9be3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/os/smb/smb_test.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,15 @@ package smb
2222
import (
2323
"fmt"
2424
"testing"
25+
"time"
26+
27+
azcache "sigs.k8s.io/cloud-provider-azure/pkg/cache"
2528
)
2629

2730
func TestCheckForDuplicateSMBMounts(t *testing.T) {
31+
getter := func(key string) (interface{}, error) { return nil, nil }
32+
volStatsCache, _ := azcache.NewTimedCache(10*time.Minute, getter, false)
33+
2834
tests := []struct {
2935
name string
3036
dir string
@@ -42,7 +48,7 @@ func TestCheckForDuplicateSMBMounts(t *testing.T) {
4248
}
4349

4450
for _, test := range tests {
45-
result, err := CheckForDuplicateSMBMounts(test.dir, test.mount, test.remoteServer)
51+
result, err := CheckForDuplicateSMBMounts(test.dir, test.mount, test.remoteServer, volStatsCache)
4652
if result != test.expectedResult {
4753
t.Errorf("Expected %v, got %v", test.expectedResult, result)
4854
}

0 commit comments

Comments
 (0)