@@ -44,112 +44,56 @@ func TestManagersEquals(t *testing.T) {
4444 {
4545 name : "Empty RHS" ,
4646 lhs : fieldpath.ManagedFields {
47- "default" : fieldpath .NewVersionedSet (
48- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
49- "v1" ,
50- false ,
51- ),
47+ "default" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v1" , false , nil ),
5248 },
5349 out : fieldpath.ManagedFields {
54- "default" : fieldpath .NewVersionedSet (
55- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
56- "v1" ,
57- false ,
58- ),
50+ "default" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v1" , false , nil ),
5951 },
6052 },
6153 {
6254 name : "Empty LHS" ,
6355 rhs : fieldpath.ManagedFields {
64- "default" : fieldpath .NewVersionedSet (
65- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
66- "v1" ,
67- false ,
68- ),
56+ "default" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v1" , false , nil ),
6957 },
7058 out : fieldpath.ManagedFields {
71- "default" : fieldpath .NewVersionedSet (
72- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
73- "v1" ,
74- false ,
75- ),
59+ "default" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v1" , false , nil ),
7660 },
7761 },
7862 {
7963 name : "Different managers" ,
8064 lhs : fieldpath.ManagedFields {
81- "one" : fieldpath .NewVersionedSet (
82- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
83- "v1" ,
84- false ,
85- ),
65+ "one" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v1" , false , nil ),
8666 },
8767 rhs : fieldpath.ManagedFields {
88- "two" : fieldpath .NewVersionedSet (
89- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
90- "v1" ,
91- false ,
92- ),
68+ "two" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v1" , false , nil ),
9369 },
9470 out : fieldpath.ManagedFields {
95- "one" : fieldpath .NewVersionedSet (
96- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
97- "v1" ,
98- false ,
99- ),
100- "two" : fieldpath .NewVersionedSet (
101- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
102- "v1" ,
103- false ,
104- ),
71+ "one" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v1" , false , nil ),
72+ "two" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v1" , false , nil ),
10573 },
10674 },
10775 {
10876 name : "Same manager, different version" ,
10977 lhs : fieldpath.ManagedFields {
110- "one" : fieldpath .NewVersionedSet (
111- _NS (_P ("numeric" ), _P ("string" ), _P ("integer" )),
112- "v1" ,
113- false ,
114- ),
78+ "one" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("integer" )), "v1" , false , nil ),
11579 },
11680 rhs : fieldpath.ManagedFields {
117- "one" : fieldpath .NewVersionedSet (
118- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
119- "v2" ,
120- false ,
121- ),
81+ "one" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v2" , false , nil ),
12282 },
12383 out : fieldpath.ManagedFields {
124- "one" : fieldpath .NewVersionedSet (
125- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
126- "v2" ,
127- false ,
128- ),
84+ "one" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v2" , false , nil ),
12985 },
13086 },
13187 {
13288 name : "Set difference" ,
13389 lhs : fieldpath.ManagedFields {
134- "one" : fieldpath .NewVersionedSet (
135- _NS (_P ("numeric" ), _P ("string" )),
136- "v1" ,
137- false ,
138- ),
90+ "one" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" )), "v1" , false , nil ),
13991 },
14092 rhs : fieldpath.ManagedFields {
141- "one" : fieldpath .NewVersionedSet (
142- _NS (_P ("string" ), _P ("bool" )),
143- "v1" ,
144- false ,
145- ),
93+ "one" : fieldpath .NewVersionedSet (_NS (_P ("string" ), _P ("bool" )), "v1" , false , nil ),
14694 },
14795 out : fieldpath.ManagedFields {
148- "one" : fieldpath .NewVersionedSet (
149- _NS (_P ("numeric" ), _P ("bool" )),
150- "v1" ,
151- false ,
152- ),
96+ "one" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("bool" )), "v1" , false , nil ),
15397 },
15498 },
15599 }
@@ -179,94 +123,54 @@ func TestManagersDifference(t *testing.T) {
179123 {
180124 name : "Same everything" ,
181125 lhs : fieldpath.ManagedFields {
182- "one" : fieldpath .NewVersionedSet (
183- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
184- "v1" ,
185- false ,
186- ),
126+ "one" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v1" , false , nil ),
187127 },
188128 rhs : fieldpath.ManagedFields {
189- "one" : fieldpath .NewVersionedSet (
190- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
191- "v1" ,
192- false ,
193- ),
129+ "one" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v1" , false , nil ),
194130 },
195131 equal : true ,
196132 },
197133 {
198134 name : "Empty RHS" ,
199135 lhs : fieldpath.ManagedFields {
200- "default" : fieldpath .NewVersionedSet (
201- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
202- "v1" ,
203- false ,
204- ),
136+ "default" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v1" , false , nil ),
205137 },
206138 equal : false ,
207139 },
208140 {
209141 name : "Empty LHS" ,
210142 rhs : fieldpath.ManagedFields {
211- "default" : fieldpath .NewVersionedSet (
212- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
213- "v1" ,
214- false ,
215- ),
143+ "default" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v1" , false , nil ),
216144 },
217145 equal : false ,
218146 },
219147 {
220148 name : "Different managers" ,
221149 lhs : fieldpath.ManagedFields {
222- "one" : fieldpath .NewVersionedSet (
223- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
224- "v1" ,
225- false ,
226- ),
150+ "one" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v1" , false , nil ),
227151 },
228152 rhs : fieldpath.ManagedFields {
229- "two" : fieldpath .NewVersionedSet (
230- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
231- "v1" ,
232- false ,
233- ),
153+ "two" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v1" , false , nil ),
234154 },
235155 equal : false ,
236156 },
237157 {
238158 name : "Same manager, different version" ,
239159 lhs : fieldpath.ManagedFields {
240- "one" : fieldpath .NewVersionedSet (
241- _NS (_P ("numeric" ), _P ("string" ), _P ("integer" )),
242- "v1" ,
243- false ,
244- ),
160+ "one" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("integer" )), "v1" , false , nil ),
245161 },
246162 rhs : fieldpath.ManagedFields {
247- "one" : fieldpath .NewVersionedSet (
248- _NS (_P ("numeric" ), _P ("string" ), _P ("bool" )),
249- "v2" ,
250- false ,
251- ),
163+ "one" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" ), _P ("bool" )), "v2" , false , nil ),
252164 },
253165 equal : false ,
254166 },
255167 {
256168 name : "Set difference" ,
257169 lhs : fieldpath.ManagedFields {
258- "one" : fieldpath .NewVersionedSet (
259- _NS (_P ("numeric" ), _P ("string" )),
260- "v1" ,
261- false ,
262- ),
170+ "one" : fieldpath .NewVersionedSet (_NS (_P ("numeric" ), _P ("string" )), "v1" , false , nil ),
263171 },
264172 rhs : fieldpath.ManagedFields {
265- "one" : fieldpath .NewVersionedSet (
266- _NS (_P ("string" ), _P ("bool" )),
267- "v1" ,
268- false ,
269- ),
173+ "one" : fieldpath .NewVersionedSet (_NS (_P ("string" ), _P ("bool" )), "v1" , false , nil ),
270174 },
271175 equal : false ,
272176 },
0 commit comments