Skip to content

Commit

Permalink
Fixed go import errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ehvs committed Jan 15, 2025
1 parent 442ce90 commit bb7e1cf
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions pkg/operator/controllers/subnets/subnet_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
armnetwork "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/to"

"github.com/sirupsen/logrus"
"go.uber.org/mock/gomock"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -403,13 +402,13 @@ func TestReconcileManager(t *testing.T) {

mock.EXPECT().Get(gomock.Any(), vnetResourceGroup, vnetName, subnetNameWorker, nil).Return(armnetwork.SubnetsClientGetResponse{Subnet: *subnetObjectMaster}, nil).MaxTimes(2)

expectedMasterSubnet := getValidSubnet()
expectedMasterSubnet.Properties.NetworkSecurityGroup.ID = to.StringPtr(nsgv2ResourceId)
for i := range expectedMasterSubnet.Properties.ServiceEndpoints {
expectedMasterSubnet.Properties.ServiceEndpoints[i].Locations = []*string{ptr.To("*")}
expectedMasterSubnet.Properties.ServiceEndpoints[i].ProvisioningState = nil
subnetObjectMasterUpdate := getValidSubnet()
subnetObjectMasterUpdate.Properties.NetworkSecurityGroup.ID = to.StringPtr(nsgv2ResourceId)
for i := range subnetObjectMasterUpdate.Properties.ServiceEndpoints {
subnetObjectMasterUpdate.Properties.ServiceEndpoints[i].Locations = []*string{ptr.To("*")}
subnetObjectMasterUpdate.Properties.ServiceEndpoints[i].ProvisioningState = nil
}
mock.EXPECT().CreateOrUpdateAndWait(gomock.Any(), vnetResourceGroup, vnetName, subnetNameWorker, *expectedMasterSubnet, nil).Return(nil)
mock.EXPECT().CreateOrUpdateAndWait(gomock.Any(), vnetResourceGroup, vnetName, subnetNameWorker, *subnetObjectMasterUpdate, nil).Return(nil)

// worker
subnetObjectWorker := getValidSubnet()
Expand Down

0 comments on commit bb7e1cf

Please sign in to comment.