Skip to content

Commit c914a52

Browse files
committed
fix ut
Signed-off-by: Wenqi Qiu <wenqi.qiu@broadcom.com>
1 parent 72da013 commit c914a52

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

build/yaml/crd/vpc/crd.nsx.vmware.com_vpcnetworkconfigurations.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ spec:
109109
vpc:
110110
description: |-
111111
NSX path of the VPC the Namespace is associated with.
112-
If vpc is set, only defaultSubnetSize takes effect, other fields are ignored.
112+
If vpc is set, only defaultSubnetSize and defaultIPv6PrefixLength take effect, other fields are ignored.
113113
type: string
114114
vpcConnectivityProfile:
115115
description: VPCConnectivityProfile Path. This profile has configuration

pkg/controllers/subnetset/subnetset_controller_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func TestReconcile(t *testing.T) {
161161
patches := gomonkey.ApplyPrivateMethod(reflect.TypeOf(r), "getSubnetBindingCRsBySubnetSet", func(_ *SubnetSetReconciler, _ context.Context, _ *v1alpha1.SubnetSet) []v1alpha1.SubnetConnectionBindingMap {
162162
return []v1alpha1.SubnetConnectionBindingMap{}
163163
})
164-
//vpcnetworkConfig := &v1alpha1.VPCNetworkConfiguration{Spec: v1alpha1.VPCNetworkConfigurationSpec{DefaultSubnetSize: 32}}
164+
// vpcnetworkConfig := &v1alpha1.VPCNetworkConfiguration{Spec: v1alpha1.VPCNetworkConfigurationSpec{DefaultSubnetSize: 32}}
165165
patches.ApplyMethod(reflect.TypeOf(r.VPCService), "GetVPCNetworkConfigByNamespace", func(_ *vpc.VPCService, ns string) (*v1alpha1.VPCNetworkConfiguration, error) {
166166
return nil, fmt.Errorf("failed to locate default NetworkConfig")
167167
})
@@ -543,9 +543,9 @@ func TestReconcileWithSubnetConnectionBindingMaps(t *testing.T) {
543543
Namespace: ns,
544544
},
545545
Spec: v1alpha1.SubnetSetSpec{
546-
AccessMode: v1alpha1.AccessMode(v1alpha1.AccessModePrivate),
547-
IPv4SubnetSize: 16,
548-
IPv6PrefixLength: testSubnetSetIPv6PrefixLen,
546+
AccessMode: v1alpha1.AccessMode(v1alpha1.AccessModePrivate),
547+
IPv4SubnetSize: 16,
548+
IPv6PrefixLength: testSubnetSetIPv6PrefixLen,
549549
},
550550
}
551551
testSubnetSet2 := &v1alpha1.SubnetSet{
@@ -557,9 +557,9 @@ func TestReconcileWithSubnetConnectionBindingMaps(t *testing.T) {
557557
},
558558
},
559559
Spec: v1alpha1.SubnetSetSpec{
560-
AccessMode: v1alpha1.AccessMode(v1alpha1.AccessModePrivate),
561-
IPv4SubnetSize: 16,
562-
IPv6PrefixLength: testSubnetSetIPv6PrefixLen,
560+
AccessMode: v1alpha1.AccessMode(v1alpha1.AccessModePrivate),
561+
IPv4SubnetSize: 16,
562+
IPv6PrefixLength: testSubnetSetIPv6PrefixLen,
563563
},
564564
}
565565
deleteTime := metav1.Now()

0 commit comments

Comments
 (0)