Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request kubernetes#4631 from lzhecheng/cherry-pick-remove-…
Browse files Browse the repository at this point in the history
…deleteblob-ut-to-1-21

[Cherry pick 1.21] Remove TestDeleteBlob UT
  • Loading branch information
k8s-ci-robot authored Jan 21, 2022
2 parents 19aba01 + 785cc16 commit da4baf7
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions cluster-autoscaler/cloudprovider/azure/azure_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ import (
"k8s.io/legacy-cloud-providers/azure/retry"
)

const (
testAccountName = "account"
storageAccountClientErrMsg = "Server failed to authenticate the request. Make sure the value of Authorization " +
"header is formed correctly including the signature"
)

func GetTestAzureUtil(t *testing.T) *AzUtil {
return &AzUtil{manager: newTestAzureManager(t)}
}
Expand Down Expand Up @@ -305,26 +299,6 @@ func TestIsAzureRequestsThrottled(t *testing.T) {
}
}

func TestDeleteBlob(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

azUtil := GetTestAzureUtil(t)
mockSAClient := mockstorageaccountclient.NewMockInterface(ctrl)
mockSAClient.EXPECT().ListKeys(
gomock.Any(),
azUtil.manager.config.ResourceGroup,
testAccountName).Return(storage.AccountListKeysResult{
Keys: &[]storage.AccountKey{
{Value: to.StringPtr("dmFsdWUK")},
},
}, nil)
azUtil.manager.azClient.storageAccountsClient = mockSAClient

err := azUtil.DeleteBlob(testAccountName, "vhd", "blob")
assert.True(t, strings.Contains(err.Error(), storageAccountClientErrMsg))
}

func TestDeleteVirtualMachine(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
Expand Down

0 comments on commit da4baf7

Please sign in to comment.