File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
pkg/registry/networking/servicecidr Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ func (serviceCIDRStrategy) NamespaceScoped() bool {
53
53
// and should not be modified by the user.
54
54
func (serviceCIDRStrategy ) GetResetFields () map [fieldpath.APIVersion ]* fieldpath.Set {
55
55
fields := map [fieldpath.APIVersion ]* fieldpath.Set {
56
+ "networking/v1beta1" : fieldpath .NewSet (
57
+ fieldpath .MakePathOrDie ("status" ),
58
+ ),
56
59
"networking/v1alpha1" : fieldpath .NewSet (
57
60
fieldpath .MakePathOrDie ("status" ),
58
61
),
@@ -125,6 +128,9 @@ var StatusStrategy = serviceCIDRStatusStrategy{Strategy}
125
128
// and should not be modified by the user.
126
129
func (serviceCIDRStatusStrategy ) GetResetFields () map [fieldpath.APIVersion ]* fieldpath.Set {
127
130
fields := map [fieldpath.APIVersion ]* fieldpath.Set {
131
+ "networking/v1beta1" : fieldpath .NewSet (
132
+ fieldpath .MakePathOrDie ("spec" ),
133
+ ),
128
134
"networking/v1alpha1" : fieldpath .NewSet (
129
135
fieldpath .MakePathOrDie ("spec" ),
130
136
),
Original file line number Diff line number Diff line change @@ -43,10 +43,6 @@ func TestServiceCIDRStrategy(t *testing.T) {
43
43
t .Errorf ("Expected ServiceCIDR to be cluster-scoped" )
44
44
}
45
45
46
- resetFields := Strategy .GetResetFields ()
47
- if len (resetFields ) != 1 {
48
- t .Errorf ("ResetFields should have 1 element, but have %d" , len (resetFields ))
49
- }
50
46
obj := & networking.ServiceCIDR {Spec : networking.ServiceCIDRSpec {CIDRs : []string {"bad cidr" }}}
51
47
52
48
errors := Strategy .Validate (context .TODO (), obj )
@@ -64,11 +60,6 @@ func TestServiceCIDRStrategy(t *testing.T) {
64
60
}
65
61
66
62
func TestServiceCIDRStatusStrategy (t * testing.T ) {
67
- resetFields := StatusStrategy .GetResetFields ()
68
- if len (resetFields ) != 1 {
69
- t .Errorf ("ResetFields should have 1 element, but have %d" , len (resetFields ))
70
- }
71
-
72
63
oldObj := & networking.ServiceCIDR {Spec : networking.ServiceCIDRSpec {}}
73
64
newObj := & networking.ServiceCIDR {
74
65
Spec : networking.ServiceCIDRSpec {
You can’t perform that action at this time.
0 commit comments