Skip to content

Commit

Permalink
Merge pull request #3189 from marwanad/fix-bad-cherry-pick-3141-1.17
Browse files Browse the repository at this point in the history
Fix bad cherry pick #3141 for 1.17
  • Loading branch information
k8s-ci-robot authored Jun 4, 2020
2 parents 627ca0d + 4b4cf92 commit 6b48fde
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,7 @@ func newTestAzureManager(t *testing.T) *AzureManager {
virtualMachinesClient: &VirtualMachinesClientMock{
FakeStore: make(map[string]map[string]compute.VirtualMachine),
},
virtualMachineScaleSetsClient: &VirtualMachineScaleSetsClientMock{
FakeStore: map[string]map[string]compute.VirtualMachineScaleSet{
"test": {
"test-asg": {
Name: &vmssName,
Sku: &compute.Sku{
Capacity: &vmssCapacity,
Name: &skuName,
},
VirtualMachineScaleSetProperties: &compute.VirtualMachineScaleSetProperties{},
Location: &location,
},
},
},
},
virtualMachineScaleSetsClient: scaleSetsClient,
virtualMachineScaleSetVMsClient: &VirtualMachineScaleSetVMsClientMock{
FakeStore: map[string]map[string]compute.VirtualMachineScaleSetVM{
"test": {
Expand Down
3 changes: 1 addition & 2 deletions cluster-autoscaler/cloudprovider/azure/azure_fakes.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources"
"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage"
"github.com/Azure/go-autorest/autorest"
"github.com/avast/retry-go"
"github.com/stretchr/testify/mock"
)

Expand Down Expand Up @@ -131,7 +130,7 @@ func (m *VirtualMachineScaleSetVMsClientMock) Get(ctx context.Context, resourceG
}

// List gets a list of VirtualMachineScaleSetVMs.
func (m *VirtualMachineScaleSetVMsClientMock) List(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, expand string) (result []compute.VirtualMachineScaleSetVM, rerr *retry.Error) {
func (m *VirtualMachineScaleSetVMsClientMock) List(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result []compute.VirtualMachineScaleSetVM, err error) {
m.mutex.Lock()
defer m.mutex.Unlock()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"testing"

"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/to"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"

Expand Down Expand Up @@ -69,9 +70,6 @@ func TestTargetSize(t *testing.T) {
assert.True(t, registered)
assert.Equal(t, len(provider.NodeGroups()), 1)

ng := provider.NodeGroups()[0]
size, err := ng.TargetSize()
println(size)
targetSize, err := provider.NodeGroups()[0].TargetSize()
assert.NoError(t, err)
assert.Equal(t, 3, targetSize)
Expand Down

0 comments on commit 6b48fde

Please sign in to comment.