@@ -21,7 +21,6 @@ import (
2121 e2e "k8s.io/kubernetes/test/e2e/framework"
2222
2323 configv1 "github.com/openshift/api/config/v1"
24- "github.com/openshift/origin/test/extended/networking"
2524 exutil "github.com/openshift/origin/test/extended/util"
2625)
2726
@@ -450,6 +449,13 @@ var (
450449 pattern : `DESCRIPTION\:.*` ,
451450 },
452451 },
452+ "network.operator.openshift.io" : {
453+ {
454+ gv : schema.GroupVersion {Group : "network.operator.openshift.io" , Version : "v1" },
455+ field : "operatorpkis.spec" ,
456+ pattern : `DESCRIPTION\:.*` ,
457+ },
458+ },
453459 }
454460
455461 // This list holds apigroups whose resources are not similar for OpenShift and MicroShift.
@@ -468,34 +474,6 @@ var (
468474 },
469475 },
470476 }
471-
472- specialNetworkingTypes = []explainExceptions {
473- {
474- gv : schema.GroupVersion {Group : "network.operator.openshift.io" , Version : "v1" },
475- field : "operatorpkis.spec" ,
476- pattern : `DESCRIPTION\:.*` ,
477- },
478- {
479- gv : schema.GroupVersion {Group : "network.openshift.io" , Version : "v1" },
480- field : "clusternetworks.clusterNetworks" ,
481- pattern : `DESCRIPTION\:.*` ,
482- },
483- {
484- gv : schema.GroupVersion {Group : "network.openshift.io" , Version : "v1" },
485- field : "hostsubnets.subnet" ,
486- pattern : `DESCRIPTION\:.*` ,
487- },
488- {
489- gv : schema.GroupVersion {Group : "network.openshift.io" , Version : "v1" },
490- field : "netnamespaces.netname" ,
491- pattern : `DESCRIPTION\:.*` ,
492- },
493- {
494- gv : schema.GroupVersion {Group : "network.openshift.io" , Version : "v1" },
495- field : "egressnetworkpolicies.spec" ,
496- pattern : `DESCRIPTION\:.*` ,
497- },
498- }
499477)
500478
501479func getCrdTypes (oc * exutil.CLI ) []schema.GroupVersionResource {
@@ -571,10 +549,6 @@ var _ = g.Describe("[sig-cli] oc explain", func() {
571549 delete (resourceMap , st .gv .WithResource (resource [0 ]))
572550 }
573551 }
574- for _ , snt := range specialNetworkingTypes {
575- resource := strings .Split (snt .field , "." )
576- delete (resourceMap , snt .gv .WithResource (resource [0 ]))
577- }
578552
579553 e2e .Logf ("These GroupVersionResources are missing proper explain test:" )
580554 for k := range resourceMap {
@@ -669,25 +643,6 @@ var _ = g.Describe("[sig-cli] oc explain", func() {
669643 }
670644})
671645
672- var _ = g .Describe ("[sig-cli] oc explain networking types" , func () {
673- defer g .GinkgoRecover ()
674-
675- oc := exutil .NewCLI ("oc-explain" )
676-
677- networking .InOpenShiftSDNContext (func () {
678- g .It ("should contain proper fields description for special networking types" , func () {
679- crdClient := apiextensionsclientset .NewForConfigOrDie (oc .AdminConfig ())
680- for _ , st := range specialNetworkingTypes {
681- e2e .Logf ("Checking %s, Field=%s..." , st .gv , st .field )
682- resource := strings .Split (st .field , "." )
683- gvr := st .gv .WithResource (resource [0 ])
684- o .Expect (verifyExplain (oc , crdClient , gvr ,
685- st .pattern , st .field , fmt .Sprintf ("--api-version=%s" , st .gv ))).NotTo (o .HaveOccurred ())
686- }
687- })
688- })
689- })
690-
691646func verifySpecStatusExplain (oc * exutil.CLI , crdClient apiextensionsclientset.Interface , gvr schema.GroupVersionResource , fieldTypeNameOverrides map [string ]string ) error {
692647 singularResourceName , _ := strings .CutSuffix (gvr .Resource , "s" )
693648 normalizedResourceName := fmt .Sprintf ("(?i)%v(?-i)" , singularResourceName ) // case insensitive
0 commit comments