diff --git a/pkg/proxy/winkernel/proxier_test.go b/pkg/proxy/winkernel/proxier_test.go index 56ffc4fe532..86178977174 100644 --- a/pkg/proxy/winkernel/proxier_test.go +++ b/pkg/proxy/winkernel/proxier_test.go @@ -129,6 +129,26 @@ func NewFakeProxier(syncPeriod time.Duration, minSyncPeriod time.Duration, hostn return proxier } +func getHcnMock(networkType string) *fakehcn.HcnMock { + var remoteSubnets []*remoteSubnetInfo + rs := &remoteSubnetInfo{ + destinationPrefix: destinationPrefix, + isolationID: 4096, + providerAddress: providerAddress, + drMacAddress: macAddress, + } + remoteSubnets = append(remoteSubnets, rs) + hnsNetworkInfo := &hnsNetworkInfo{ + id: strings.ToUpper(guid), + name: testNetwork, + networkType: networkType, + remoteSubnets: remoteSubnets, + } + hnsNetwork := newHnsNetwork(hnsNetworkInfo) + hcnMock := fakehcn.NewHcnMock(hnsNetwork) + return hcnMock +} + func TestCreateServiceVip(t *testing.T) { syncPeriod := 30 * time.Second proxier := NewFakeProxier(syncPeriod, syncPeriod, "testhost", netutils.ParseIPSloppy("10.0.0.1"), NETWORK_TYPE_OVERLAY)