@@ -129,10 +129,10 @@ func TestAPIAndWebhookChanges(t *testing.T) {
129129 g .Eventually (func () error {
130130 cluster1Refs , err = getClusterTopologyReferences (cluster1 , "v1beta1" ,
131131 checkOmittableFromPatchesField (omittableFieldsMustNotBeSet ), // The defaulting webhook drops the omittable field when using v1beta1.
132- checkPtrTypeToType (), // "" should never show up in the yaml ("" is not a valid value).
133- checkTypeToPtrType (), // zero or false should never show up due to omitempty (mutating webhook is dropping omitempty values).
134- checkDurationToPtrInt32 (zeroSecondsMustBeSet ), // metav1.Duration is marshalled as 0s.
135- checkTypeToOmitZeroType (zeroMustBeSet ), // zero value should show up (no omitzero).
132+ checkPtrTypeToType (), // "" should never show up in the yaml ("" is not a valid value).
133+ checkTypeToPtrType (), // zero or false should never show up due to omitempty (mutating webhook is dropping omitempty values).
134+ checkDurationToPtrInt32 (zeroSecondsMustBeSet ), // metav1.Duration is marshalled as 0s.
135+ checkTypeToOmitZeroType (zeroMustBeSet ), // zero value should show up (no omitzero).
136136 )
137137 if err != nil {
138138 return err
@@ -187,10 +187,10 @@ func TestAPIAndWebhookChanges(t *testing.T) {
187187 g .Eventually (func () error {
188188 cluster1RefsNew , err = getClusterTopologyReferences (cluster1 , "v1beta2" ,
189189 checkOmittableFromPatchesField (omittableFieldsMustBeSet ), // The defaulting webhook does not drop the omittable field anymore when using v1beta2.
190- checkPtrTypeToType (), // "" should never show up in the yaml due to omitempty (we set to "" in conversion, but omitempty drops it from yaml).
191- checkTypeToPtrType (), // zero or false should never show up (we drop zero or false on conversion, we assume implicitly set)
192- checkDurationToPtrInt32 (zeroSecondsMustNotBeSet ), // 0 should never show up (we drop 0 on conversion, we assume implicitly set)
193- checkTypeToOmitZeroType (zeroMustNotBeSet ), // zero value must not show up (omitzero through conversion).
190+ checkPtrTypeToType (), // "" should never show up in the yaml due to omitempty (we set to "" in conversion, but omitempty drops it from yaml).
191+ checkTypeToPtrType (), // zero or false should never show up (we drop zero or false on conversion, we assume implicitly set)
192+ checkDurationToPtrInt32 (zeroSecondsMustNotBeSet ), // 0 should never show up (we drop 0 on conversion, we assume implicitly set)
193+ checkTypeToOmitZeroType (zeroMustNotBeSet ), // zero value must not show up (omitzero through conversion).
194194 )
195195 if err != nil {
196196 return err
@@ -209,10 +209,10 @@ func TestAPIAndWebhookChanges(t *testing.T) {
209209 g .Eventually (func () error {
210210 cluster2Refs , err = getClusterTopologyReferences (cluster2 , "v1beta2" ,
211211 checkOmittableFromPatchesField (omittableFieldsMustNotBeSet ), // The conversion webhook drops the omittable field when using v1beta1.
212- checkPtrTypeToType (), // "" should never show up in the yaml ("" is not a valid value).
213- checkTypeToPtrType (), // zero or false should never show up (we drop zero or false on conversion, we assume implicitly set)
214- checkDurationToPtrInt32 (zeroSecondsMustNotBeSet ), // 0 should never show up (we drop 0 on conversion, we assume implicitly set)
215- checkTypeToOmitZeroType (zeroMustNotBeSet ), // zero value must not show up (omitzero through conversion, also not a valid value).
212+ checkPtrTypeToType (), // "" should never show up in the yaml ("" is not a valid value).
213+ checkTypeToPtrType (), // zero or false should never show up (we drop zero or false on conversion, we assume implicitly set)
214+ checkDurationToPtrInt32 (zeroSecondsMustNotBeSet ), // 0 should never show up (we drop 0 on conversion, we assume implicitly set)
215+ checkTypeToOmitZeroType (zeroMustNotBeSet ), // zero value must not show up (omitzero through conversion, also not a valid value).
216216 )
217217 if err != nil {
218218 return err
@@ -236,10 +236,10 @@ func TestAPIAndWebhookChanges(t *testing.T) {
236236 g .Eventually (func () error {
237237 cluster2RefsNew , err = getClusterTopologyReferences (cluster2 , "v1beta2" ,
238238 checkOmittableFromPatchesField (omittableFieldsMustBeSet ), // The defaulting webhook do not drop anymore the omittable field when using v1beta2.
239- checkPtrTypeToType (), // "" should never show up in the yaml due to omitempty (also not a valid value).
240- checkTypeToPtrType (), // zero or false should never show up (it will show up if someone explicitly set zero or false)
241- checkDurationToPtrInt32 (zeroSecondsMustNotBeSet ), // 0 should never show up (it will show up if someone explicitly sets 0)
242- checkTypeToOmitZeroType (zeroMustNotBeSet ), // zero value must not show up (omitzero, also not a valid value).
239+ checkPtrTypeToType (), // "" should never show up in the yaml due to omitempty (also not a valid value).
240+ checkTypeToPtrType (), // zero or false should never show up (it will show up if someone explicitly set zero or false)
241+ checkDurationToPtrInt32 (zeroSecondsMustNotBeSet ), // 0 should never show up (it will show up if someone explicitly sets 0)
242+ checkTypeToOmitZeroType (zeroMustNotBeSet ), // zero value must not show up (omitzero, also not a valid value).
243243 )
244244 if err != nil {
245245 return err
0 commit comments