@@ -43,10 +43,8 @@ func TestCollectCRDFileNamesWithActualPath(t *testing.T) {
4343 wantError bool
4444 }{
4545 {
46- name : "hub mode v1beta1 with actual directory" ,
47- mode : "hub" ,
48- enablev1beta1API : true ,
49- enablev1alpha1API : false ,
46+ name : "hub mode v1beta1 with actual directory" ,
47+ mode : "hub" ,
5048 wantedCRDFiles : map [string ]bool {
5149 "../../config/crd/bases/cluster.kubernetes-fleet.io_memberclusters.yaml" : true ,
5250 "../../config/crd/bases/cluster.kubernetes-fleet.io_internalmemberclusters.yaml" : true ,
@@ -71,44 +69,19 @@ func TestCollectCRDFileNamesWithActualPath(t *testing.T) {
7169 wantError : false ,
7270 },
7371 {
74- name : "member mode v1beta1 with actual directory" ,
75- mode : "member" ,
76- enablev1beta1API : true ,
77- enablev1alpha1API : false ,
72+ name : "member mode v1beta1 with actual directory" ,
73+ mode : "member" ,
7874 wantedCRDFiles : map [string ]bool {
7975 "../../config/crd/bases/placement.kubernetes-fleet.io_appliedworks.yaml" : true ,
8076 },
8177 wantError : false ,
8278 },
83- {
84- name : "hub mode v1alpha1 with actual directory" ,
85- mode : "hub" ,
86- enablev1beta1API : false ,
87- enablev1alpha1API : true ,
88- wantedCRDFiles : map [string ]bool {
89- "../../config/crd/bases/fleet.azure.com_memberclusters.yaml" : true ,
90- "../../config/crd/bases/fleet.azure.com_internalmemberclusters.yaml" : true ,
91- "../../config/crd/bases/fleet.azure.com_clusterresourceplacements.yaml" : true ,
92- "../../config/crd/bases/multicluster.x-k8s.io_works.yaml" : true ,
93- },
94- wantError : false ,
95- },
96- {
97- name : "member mode v1alpha1 with actual directory" ,
98- mode : "member" ,
99- enablev1beta1API : false ,
100- enablev1alpha1API : true ,
101- wantedCRDFiles : map [string ]bool {
102- "../../config/crd/bases/multicluster.x-k8s.io_appliedworks.yaml" : true ,
103- },
104- wantError : false ,
105- },
10679 }
10780
10881 for _ , tt := range tests {
10982 t .Run (tt .name , func (t * testing.T ) {
11083 // Call the function
111- gotCRDFiles , err := cmdCRDInstaller .CollectCRDFileNames (realCRDPath , tt .mode , tt . enablev1alpha1API , tt . enablev1beta1API )
84+ gotCRDFiles , err := cmdCRDInstaller .CollectCRDFileNames (realCRDPath , tt .mode )
11285 if (err != nil ) != tt .wantError {
11386 t .Errorf ("collectCRDFileNames() error = %v, wantError %v" , err , tt .wantError )
11487 }
0 commit comments