@@ -74,8 +74,8 @@ type fixture struct {
7474 icspLister []* apioperatorsv1alpha1.ImageContentSourcePolicy
7575 idmsLister []* apicfgv1.ImageDigestMirrorSet
7676 itmsLister []* apicfgv1.ImageTagMirrorSet
77- clusterImagePolicyLister []* apicfgv1alpha1 .ClusterImagePolicy
78- imagePolicyLister []* apicfgv1alpha1 .ImagePolicy
77+ clusterImagePolicyLister []* apicfgv1 .ClusterImagePolicy
78+ imagePolicyLister []* apicfgv1 .ImagePolicy
7979
8080 actions []core.Action
8181 skipActionsValidation bool
@@ -211,20 +211,20 @@ func newClusterVersionConfig(name, desiredImage string) *apicfgv1.ClusterVersion
211211 }
212212}
213213
214- func newClusterImagePolicyWithPublicKey (name string , scopes []string , keyData []byte ) * apicfgv1alpha1 .ClusterImagePolicy {
215- imgScopes := []apicfgv1alpha1 .ImageScope {}
214+ func newClusterImagePolicyWithPublicKey (name string , scopes []string , keyData []byte ) * apicfgv1 .ClusterImagePolicy {
215+ imgScopes := []apicfgv1 .ImageScope {}
216216 for _ , scope := range scopes {
217- imgScopes = append (imgScopes , apicfgv1alpha1 .ImageScope (scope ))
217+ imgScopes = append (imgScopes , apicfgv1 .ImageScope (scope ))
218218 }
219- return & apicfgv1alpha1 .ClusterImagePolicy {
219+ return & apicfgv1 .ClusterImagePolicy {
220220 TypeMeta : metav1.TypeMeta {APIVersion : apicfgv1alpha1 .SchemeGroupVersion .String ()},
221221 ObjectMeta : metav1.ObjectMeta {Name : name , UID : types .UID (utilrand .String (5 )), Generation : 1 },
222- Spec : apicfgv1alpha1 .ClusterImagePolicySpec {
222+ Spec : apicfgv1 .ClusterImagePolicySpec {
223223 Scopes : imgScopes ,
224- Policy : apicfgv1alpha1 .Policy {
225- RootOfTrust : apicfgv1alpha1 .PolicyRootOfTrust {
226- PolicyType : apicfgv1alpha1 .PublicKeyRootOfTrust ,
227- PublicKey : & apicfgv1alpha1 .PublicKey {
224+ Policy : apicfgv1 .Policy {
225+ RootOfTrust : apicfgv1 .PolicyRootOfTrust {
226+ PolicyType : apicfgv1 .PublicKeyRootOfTrust ,
227+ PublicKey : & apicfgv1 .PublicKey {
228228 KeyData : keyData ,
229229 },
230230 },
@@ -233,20 +233,20 @@ func newClusterImagePolicyWithPublicKey(name string, scopes []string, keyData []
233233 }
234234}
235235
236- func newImagePolicyWithPublicKey (name , namespace string , scopes []string , keyData []byte ) * apicfgv1alpha1 .ImagePolicy {
237- imgScopes := []apicfgv1alpha1 .ImageScope {}
236+ func newImagePolicyWithPublicKey (name , namespace string , scopes []string , keyData []byte ) * apicfgv1 .ImagePolicy {
237+ imgScopes := []apicfgv1 .ImageScope {}
238238 for _ , scope := range scopes {
239- imgScopes = append (imgScopes , apicfgv1alpha1 .ImageScope (scope ))
239+ imgScopes = append (imgScopes , apicfgv1 .ImageScope (scope ))
240240 }
241- return & apicfgv1alpha1 .ImagePolicy {
241+ return & apicfgv1 .ImagePolicy {
242242 TypeMeta : metav1.TypeMeta {APIVersion : apicfgv1alpha1 .SchemeGroupVersion .String ()},
243243 ObjectMeta : metav1.ObjectMeta {Name : name , Namespace : namespace , UID : types .UID (utilrand .String (5 )), Generation : 1 },
244- Spec : apicfgv1alpha1 .ImagePolicySpec {
244+ Spec : apicfgv1 .ImagePolicySpec {
245245 Scopes : imgScopes ,
246- Policy : apicfgv1alpha1 .Policy {
247- RootOfTrust : apicfgv1alpha1 .PolicyRootOfTrust {
248- PolicyType : apicfgv1alpha1 .PublicKeyRootOfTrust ,
249- PublicKey : & apicfgv1alpha1 .PublicKey {
246+ Policy : apicfgv1 .Policy {
247+ RootOfTrust : apicfgv1 .PolicyRootOfTrust {
248+ PolicyType : apicfgv1 .PublicKeyRootOfTrust ,
249+ PublicKey : & apicfgv1 .PublicKey {
250250 KeyData : keyData ,
251251 },
252252 },
@@ -323,10 +323,10 @@ func (f *fixture) newController() *Controller {
323323 ci .Config ().V1 ().ImageTagMirrorSets ().Informer ().GetIndexer ().Add (c )
324324 }
325325 for _ , c := range f .clusterImagePolicyLister {
326- ci .Config ().V1alpha1 ().ClusterImagePolicies ().Informer ().GetIndexer ().Add (c )
326+ ci .Config ().V1 ().ClusterImagePolicies ().Informer ().GetIndexer ().Add (c )
327327 }
328328 for _ , c := range f .imagePolicyLister {
329- ci .Config ().V1alpha1 ().ImagePolicies ().Informer ().GetIndexer ().Add (c )
329+ ci .Config ().V1 ().ImagePolicies ().Informer ().GetIndexer ().Add (c )
330330 }
331331
332332 return c
@@ -473,7 +473,7 @@ type registriesConfigAndPolicyVerifyOptions struct {
473473 numberOfImagePolicyNamespaces int
474474}
475475
476- func (f * fixture ) verifyRegistriesConfigAndPolicyJSONContents (t * testing.T , mcName string , imgcfg * apicfgv1.Image , icsp * apioperatorsv1alpha1.ImageContentSourcePolicy , idms * apicfgv1.ImageDigestMirrorSet , itms * apicfgv1.ImageTagMirrorSet , clusterImagePolicy * apicfgv1alpha1 .ClusterImagePolicy , imagePolicy * apicfgv1alpha1 .ImagePolicy , releaseImageReg string , opts registriesConfigAndPolicyVerifyOptions ) {
476+ func (f * fixture ) verifyRegistriesConfigAndPolicyJSONContents (t * testing.T , mcName string , imgcfg * apicfgv1.Image , icsp * apioperatorsv1alpha1.ImageContentSourcePolicy , idms * apicfgv1.ImageDigestMirrorSet , itms * apicfgv1.ImageTagMirrorSet , clusterImagePolicy * apicfgv1 .ClusterImagePolicy , imagePolicy * apicfgv1 .ImagePolicy , releaseImageReg string , opts registriesConfigAndPolicyVerifyOptions ) {
477477 icsps := []* apioperatorsv1alpha1.ImageContentSourcePolicy {}
478478 if icsp != nil {
479479 icsps = append (icsps , icsp )
@@ -486,11 +486,11 @@ func (f *fixture) verifyRegistriesConfigAndPolicyJSONContents(t *testing.T, mcNa
486486 if itms != nil {
487487 itmss = append (itmss , itms )
488488 }
489- clusterImagePolicies := []* apicfgv1alpha1 .ClusterImagePolicy {}
489+ clusterImagePolicies := []* apicfgv1 .ClusterImagePolicy {}
490490 if clusterImagePolicy != nil {
491491 clusterImagePolicies = append (clusterImagePolicies , clusterImagePolicy )
492492 }
493- imagePolicies := []* apicfgv1alpha1 .ImagePolicy {}
493+ imagePolicies := []* apicfgv1 .ImagePolicy {}
494494 if imagePolicy != nil {
495495 imagePolicies = append (imagePolicies , imagePolicy )
496496 }
@@ -499,7 +499,7 @@ func (f *fixture) verifyRegistriesConfigAndPolicyJSONContents(t *testing.T, mcNa
499499 verifyRegistriesConfigAndPolicyJSONContents (t , updatedMC , mcName , imgcfg , icsps , idmss , itmss , clusterImagePolicies , imagePolicies , releaseImageReg , opts )
500500}
501501
502- func verifyRegistriesConfigAndPolicyJSONContents (t * testing.T , mc * mcfgv1.MachineConfig , mcName string , imgcfg * apicfgv1.Image , icsps []* apioperatorsv1alpha1.ImageContentSourcePolicy , idmss []* apicfgv1.ImageDigestMirrorSet , itmss []* apicfgv1.ImageTagMirrorSet , clusterImagePolicies []* apicfgv1alpha1 .ClusterImagePolicy , imagePolicies []* apicfgv1alpha1 .ImagePolicy , releaseImageReg string , opts registriesConfigAndPolicyVerifyOptions ) {
502+ func verifyRegistriesConfigAndPolicyJSONContents (t * testing.T , mc * mcfgv1.MachineConfig , mcName string , imgcfg * apicfgv1.Image , icsps []* apioperatorsv1alpha1.ImageContentSourcePolicy , idmss []* apicfgv1.ImageDigestMirrorSet , itmss []* apicfgv1.ImageTagMirrorSet , clusterImagePolicies []* apicfgv1 .ClusterImagePolicy , imagePolicies []* apicfgv1 .ImagePolicy , releaseImageReg string , opts registriesConfigAndPolicyVerifyOptions ) {
503503 // This is not testing updateRegistriesConfig, which has its own tests; this verifies the created object contains the expected
504504 // configuration file.
505505 // First get the valid blocked registries to ensure we don't block the registry where the release image is from
@@ -1237,8 +1237,8 @@ func TestRunImageBootstrap(t *testing.T) {
12371237 icspRules []* apioperatorsv1alpha1.ImageContentSourcePolicy
12381238 idmsRules []* apicfgv1.ImageDigestMirrorSet
12391239 itmsRules []* apicfgv1.ImageTagMirrorSet
1240- clusterImagePolicies []* apicfgv1alpha1 .ClusterImagePolicy
1241- imagePolicies []* apicfgv1alpha1 .ImagePolicy
1240+ clusterImagePolicies []* apicfgv1 .ClusterImagePolicy
1241+ imagePolicies []* apicfgv1 .ImagePolicy
12421242 imagePolicyNamespaces int
12431243 }{
12441244 {
@@ -1267,10 +1267,10 @@ func TestRunImageBootstrap(t *testing.T) {
12671267 },
12681268 },
12691269 {
1270- clusterImagePolicies : []* apicfgv1alpha1 .ClusterImagePolicy {
1270+ clusterImagePolicies : []* apicfgv1 .ClusterImagePolicy {
12711271 & testClusterImagePolicy ,
12721272 },
1273- imagePolicies : []* apicfgv1alpha1 .ImagePolicy {
1273+ imagePolicies : []* apicfgv1 .ImagePolicy {
12741274 & testImagePolicy ,
12751275 },
12761276 imagePolicyNamespaces : 1 ,
0 commit comments