Skip to content

Commit

Permalink
test: fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhangx authored and k8s-infra-cherrypick-robot committed Jul 10, 2024
1 parent 134e830 commit d7d2a88
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/provider/azure_storageaccount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1557,6 +1557,7 @@ func TestIsMultichannelEnabledEqual(t *testing.T) {
accountName := "account2"

cloud := GetTestCloud(ctrl)
getter := func(key string) (interface{}, error) { return nil, nil }

multichannelEnabled := storage.FileServiceProperties{
FileServicePropertiesProperties: &storage.FileServicePropertiesProperties{
Expand Down Expand Up @@ -1611,7 +1612,7 @@ func TestIsMultichannelEnabledEqual(t *testing.T) {
expectedResult: false,
},
{
desc: "IsMultichannelEnabled not equal",
desc: "IsMultichannelEnabled not equal #1",
account: storage.Account{
Name: &accountName,
AccountProperties: &storage.AccountProperties{},
Expand All @@ -1636,7 +1637,7 @@ func TestIsMultichannelEnabledEqual(t *testing.T) {
expectedResult: false,
},
{
desc: "IsMultichannelEnabled not equal",
desc: "IsMultichannelEnabled not equal #2",
account: storage.Account{
Name: &accountName,
AccountProperties: &storage.AccountProperties{},
Expand All @@ -1648,7 +1649,7 @@ func TestIsMultichannelEnabledEqual(t *testing.T) {
expectedResult: false,
},
{
desc: "IsMultichannelEnabled is equal",
desc: "IsMultichannelEnabled is equal #1",
account: storage.Account{
Name: &accountName,
AccountProperties: &storage.AccountProperties{},
Expand All @@ -1660,7 +1661,7 @@ func TestIsMultichannelEnabledEqual(t *testing.T) {
expectedResult: true,
},
{
desc: "IsMultichannelEnabled is equal",
desc: "IsMultichannelEnabled is equal #2",
account: storage.Account{
Name: &accountName,
AccountProperties: &storage.AccountProperties{},
Expand All @@ -1686,6 +1687,7 @@ func TestIsMultichannelEnabledEqual(t *testing.T) {
}

for _, test := range tests {
cloud.fileServicePropertiesCache, _ = cache.NewTimedCache(time.Minute, getter, false)
if test.serviceProperties != nil {
mockFileClient.EXPECT().GetServiceProperties(gomock.Any(), gomock.Any(), gomock.Any()).Return(*test.serviceProperties, test.servicePropertiesRetError).Times(1)
}
Expand Down

0 comments on commit d7d2a88

Please sign in to comment.