Skip to content

Commit

Permalink
Remove TestDeleteBlob UT
Browse files Browse the repository at this point in the history
Signed-off-by: Zhecheng Li <[email protected]>
  • Loading branch information
lzhecheng committed Jan 21, 2022
1 parent 271bafc commit 54eeae4
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 (
"sigs.k8s.io/cloud-provider-azure/pkg/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 54eeae4

Please sign in to comment.