@@ -59,7 +59,7 @@ var _ = SIGDescribe("CustomResourcePublishOpenAPI [Feature:CustomResourcePublish
59
59
framework .Failf ("%v" , err )
60
60
}
61
61
62
- meta := fmt .Sprintf (metaPattern , crd .Kind , crd .ApiGroup , crd .Versions [0 ].Name , "test-foo" )
62
+ meta := fmt .Sprintf (metaPattern , crd .Kind , crd .APIGroup , crd .Versions [0 ].Name , "test-foo" )
63
63
ns := fmt .Sprintf ("--namespace=%v" , f .Namespace .Name )
64
64
65
65
By ("client-side validation (kubectl create and apply) allows request with known and required properties" )
@@ -127,7 +127,7 @@ var _ = SIGDescribe("CustomResourcePublishOpenAPI [Feature:CustomResourcePublish
127
127
framework .Failf ("%v" , err )
128
128
}
129
129
130
- meta := fmt .Sprintf (metaPattern , crd .Kind , crd .ApiGroup , crd .Versions [0 ].Name , "test-cr" )
130
+ meta := fmt .Sprintf (metaPattern , crd .Kind , crd .APIGroup , crd .Versions [0 ].Name , "test-cr" )
131
131
ns := fmt .Sprintf ("--namespace=%v" , f .Namespace .Name )
132
132
133
133
By ("client-side validation (kubectl create and apply) allows request with any unknown properties" )
@@ -165,8 +165,8 @@ var _ = SIGDescribe("CustomResourcePublishOpenAPI [Feature:CustomResourcePublish
165
165
if err != nil {
166
166
framework .Failf ("%v" , err )
167
167
}
168
- if crdFoo .ApiGroup == crdWaldo .ApiGroup {
169
- framework .Failf ("unexpected: CRDs should be of different group %v, %v" , crdFoo .ApiGroup , crdWaldo .ApiGroup )
168
+ if crdFoo .APIGroup == crdWaldo .APIGroup {
169
+ framework .Failf ("unexpected: CRDs should be of different group %v, %v" , crdFoo .APIGroup , crdWaldo .APIGroup )
170
170
}
171
171
if err := waitForDefinition (f .ClientSet , definitionName (crdWaldo , "v1beta1" ), schemaWaldo ); err != nil {
172
172
framework .Failf ("%v" , err )
@@ -207,8 +207,8 @@ var _ = SIGDescribe("CustomResourcePublishOpenAPI [Feature:CustomResourcePublish
207
207
if err != nil {
208
208
framework .Failf ("%v" , err )
209
209
}
210
- if crdFoo .ApiGroup != crdWaldo .ApiGroup {
211
- framework .Failf ("unexpected: CRDs should be of the same group %v, %v" , crdFoo .ApiGroup , crdWaldo .ApiGroup )
210
+ if crdFoo .APIGroup != crdWaldo .APIGroup {
211
+ framework .Failf ("unexpected: CRDs should be of the same group %v, %v" , crdFoo .APIGroup , crdWaldo .APIGroup )
212
212
}
213
213
if err := waitForDefinition (f .ClientSet , definitionName (crdWaldo , "v5" ), schemaWaldo ); err != nil {
214
214
framework .Failf ("%v" , err )
@@ -234,8 +234,8 @@ var _ = SIGDescribe("CustomResourcePublishOpenAPI [Feature:CustomResourcePublish
234
234
if err != nil {
235
235
framework .Failf ("%v" , err )
236
236
}
237
- if crdFoo .ApiGroup != crdWaldo .ApiGroup {
238
- framework .Failf ("unexpected: CRDs should be of the same group %v, %v" , crdFoo .ApiGroup , crdWaldo .ApiGroup )
237
+ if crdFoo .APIGroup != crdWaldo .APIGroup {
238
+ framework .Failf ("unexpected: CRDs should be of the same group %v, %v" , crdFoo .APIGroup , crdWaldo .APIGroup )
239
239
}
240
240
if err := waitForDefinition (f .ClientSet , definitionName (crdWaldo , "v6" ), schemaWaldo ); err != nil {
241
241
framework .Failf ("%v" , err )
@@ -266,7 +266,7 @@ var _ = SIGDescribe("CustomResourcePublishOpenAPI [Feature:CustomResourcePublish
266
266
267
267
By ("rename a version" )
268
268
patch := []byte (`{"spec":{"versions":[{"name":"v2","served":true,"storage":true},{"name":"v4","served":true,"storage":false}]}}` )
269
- crdMultiVer .Crd , err = crdMultiVer .ApiExtensionClient .ApiextensionsV1beta1 ().CustomResourceDefinitions ().Patch (crdMultiVer .GetMetaName (), types .MergePatchType , patch )
269
+ crdMultiVer .Crd , err = crdMultiVer .APIExtensionClient .ApiextensionsV1beta1 ().CustomResourceDefinitions ().Patch (crdMultiVer .GetMetaName (), types .MergePatchType , patch )
270
270
if err != nil {
271
271
framework .Failf ("%v" , err )
272
272
}
@@ -308,7 +308,7 @@ var _ = SIGDescribe("CustomResourcePublishOpenAPI [Feature:CustomResourcePublish
308
308
309
309
By ("mark a version not serverd" )
310
310
crd .Crd .Spec .Versions [1 ].Served = false
311
- crd .Crd , err = crd .ApiExtensionClient .ApiextensionsV1beta1 ().CustomResourceDefinitions ().Update (crd .Crd )
311
+ crd .Crd , err = crd .APIExtensionClient .ApiextensionsV1beta1 ().CustomResourceDefinitions ().Update (crd .Crd )
312
312
if err != nil {
313
313
framework .Failf ("%v" , err )
314
314
}
@@ -385,7 +385,7 @@ func patchSchema(schema []byte, crd *crd.TestCrd) error {
385
385
return fmt .Errorf ("failed to create json patch: %v" , err )
386
386
}
387
387
patch := []byte (fmt .Sprintf (`{"spec":{"validation":{"openAPIV3Schema":%s}}}` , string (s )))
388
- crd .Crd , err = crd .ApiExtensionClient .ApiextensionsV1beta1 ().CustomResourceDefinitions ().Patch (crd .GetMetaName (), types .MergePatchType , patch )
388
+ crd .Crd , err = crd .APIExtensionClient .ApiextensionsV1beta1 ().CustomResourceDefinitions ().Patch (crd .GetMetaName (), types .MergePatchType , patch )
389
389
return err
390
390
}
391
391
@@ -486,7 +486,7 @@ func verifyKubectlExplain(name, pattern string) error {
486
486
487
487
// definitionName returns the openapi definition name for given CRD in given version
488
488
func definitionName (crd * crd.TestCrd , version string ) string {
489
- return openapiutil .ToRESTFriendlyName (fmt .Sprintf ("%s/%s/%s" , crd .ApiGroup , version , crd .Kind ))
489
+ return openapiutil .ToRESTFriendlyName (fmt .Sprintf ("%s/%s/%s" , crd .APIGroup , version , crd .Kind ))
490
490
}
491
491
492
492
var schemaFoo = []byte (`description: Foo CRD for Testing
0 commit comments