@@ -75,8 +75,8 @@ type fixture struct {
7575 icspLister []* apioperatorsv1alpha1.ImageContentSourcePolicy
7676 idmsLister []* apicfgv1.ImageDigestMirrorSet
7777 itmsLister []* apicfgv1.ImageTagMirrorSet
78- clusterImagePolicyLister []* apicfgv1alpha1 .ClusterImagePolicy
79- imagePolicyLister []* apicfgv1alpha1 .ImagePolicy
78+ clusterImagePolicyLister []* apicfgv1 .ClusterImagePolicy
79+ imagePolicyLister []* apicfgv1 .ImagePolicy
8080
8181 actions []core.Action
8282 skipActionsValidation bool
@@ -212,20 +212,20 @@ func newClusterVersionConfig(name, desiredImage string) *apicfgv1.ClusterVersion
212212 }
213213}
214214
215- func newClusterImagePolicyWithPublicKey (name string , scopes []string , keyData []byte ) * apicfgv1alpha1 .ClusterImagePolicy {
216- imgScopes := []apicfgv1alpha1 .ImageScope {}
215+ func newClusterImagePolicyWithPublicKey (name string , scopes []string , keyData []byte ) * apicfgv1 .ClusterImagePolicy {
216+ imgScopes := []apicfgv1 .ImageScope {}
217217 for _ , scope := range scopes {
218- imgScopes = append (imgScopes , apicfgv1alpha1 .ImageScope (scope ))
218+ imgScopes = append (imgScopes , apicfgv1 .ImageScope (scope ))
219219 }
220- return & apicfgv1alpha1 .ClusterImagePolicy {
220+ return & apicfgv1 .ClusterImagePolicy {
221221 TypeMeta : metav1.TypeMeta {APIVersion : apicfgv1alpha1 .SchemeGroupVersion .String ()},
222222 ObjectMeta : metav1.ObjectMeta {Name : name , UID : types .UID (utilrand .String (5 )), Generation : 1 },
223- Spec : apicfgv1alpha1 .ClusterImagePolicySpec {
223+ Spec : apicfgv1 .ClusterImagePolicySpec {
224224 Scopes : imgScopes ,
225- Policy : apicfgv1alpha1 .Policy {
226- RootOfTrust : apicfgv1alpha1 .PolicyRootOfTrust {
227- PolicyType : apicfgv1alpha1 .PublicKeyRootOfTrust ,
228- PublicKey : & apicfgv1alpha1 .PublicKey {
225+ Policy : apicfgv1 .Policy {
226+ RootOfTrust : apicfgv1 .PolicyRootOfTrust {
227+ PolicyType : apicfgv1 .PublicKeyRootOfTrust ,
228+ PublicKey : & apicfgv1 .PublicKey {
229229 KeyData : keyData ,
230230 },
231231 },
@@ -234,20 +234,20 @@ func newClusterImagePolicyWithPublicKey(name string, scopes []string, keyData []
234234 }
235235}
236236
237- func newImagePolicyWithPublicKey (name , namespace string , scopes []string , keyData []byte ) * apicfgv1alpha1 .ImagePolicy {
238- imgScopes := []apicfgv1alpha1 .ImageScope {}
237+ func newImagePolicyWithPublicKey (name , namespace string , scopes []string , keyData []byte ) * apicfgv1 .ImagePolicy {
238+ imgScopes := []apicfgv1 .ImageScope {}
239239 for _ , scope := range scopes {
240- imgScopes = append (imgScopes , apicfgv1alpha1 .ImageScope (scope ))
240+ imgScopes = append (imgScopes , apicfgv1 .ImageScope (scope ))
241241 }
242- return & apicfgv1alpha1 .ImagePolicy {
242+ return & apicfgv1 .ImagePolicy {
243243 TypeMeta : metav1.TypeMeta {APIVersion : apicfgv1alpha1 .SchemeGroupVersion .String ()},
244244 ObjectMeta : metav1.ObjectMeta {Name : name , Namespace : namespace , UID : types .UID (utilrand .String (5 )), Generation : 1 },
245- Spec : apicfgv1alpha1 .ImagePolicySpec {
245+ Spec : apicfgv1 .ImagePolicySpec {
246246 Scopes : imgScopes ,
247- Policy : apicfgv1alpha1 .Policy {
248- RootOfTrust : apicfgv1alpha1 .PolicyRootOfTrust {
249- PolicyType : apicfgv1alpha1 .PublicKeyRootOfTrust ,
250- PublicKey : & apicfgv1alpha1 .PublicKey {
247+ Policy : apicfgv1 .Policy {
248+ RootOfTrust : apicfgv1 .PolicyRootOfTrust {
249+ PolicyType : apicfgv1 .PublicKeyRootOfTrust ,
250+ PublicKey : & apicfgv1 .PublicKey {
251251 KeyData : keyData ,
252252 },
253253 },
@@ -474,7 +474,7 @@ type registriesConfigAndPolicyVerifyOptions struct {
474474 numberOfImagePolicyNamespaces int
475475}
476476
477- 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 ) {
477+ 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 ) {
478478 icsps := []* apioperatorsv1alpha1.ImageContentSourcePolicy {}
479479 if icsp != nil {
480480 icsps = append (icsps , icsp )
@@ -487,11 +487,11 @@ func (f *fixture) verifyRegistriesConfigAndPolicyJSONContents(t *testing.T, mcNa
487487 if itms != nil {
488488 itmss = append (itmss , itms )
489489 }
490- clusterImagePolicies := []* apicfgv1alpha1 .ClusterImagePolicy {}
490+ clusterImagePolicies := []* apicfgv1 .ClusterImagePolicy {}
491491 if clusterImagePolicy != nil {
492492 clusterImagePolicies = append (clusterImagePolicies , clusterImagePolicy )
493493 }
494- imagePolicies := []* apicfgv1alpha1 .ImagePolicy {}
494+ imagePolicies := []* apicfgv1 .ImagePolicy {}
495495 if imagePolicy != nil {
496496 imagePolicies = append (imagePolicies , imagePolicy )
497497 }
@@ -500,7 +500,7 @@ func (f *fixture) verifyRegistriesConfigAndPolicyJSONContents(t *testing.T, mcNa
500500 verifyRegistriesConfigAndPolicyJSONContents (t , updatedMC , mcName , imgcfg , icsps , idmss , itmss , clusterImagePolicies , imagePolicies , releaseImageReg , opts )
501501}
502502
503- 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 ) {
503+ 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 ) {
504504 // This is not testing updateRegistriesConfig, which has its own tests; this verifies the created object contains the expected
505505 // configuration file.
506506 // First get the valid blocked registries to ensure we don't block the registry where the release image is from
@@ -1238,8 +1238,8 @@ func TestRunImageBootstrap(t *testing.T) {
12381238 icspRules []* apioperatorsv1alpha1.ImageContentSourcePolicy
12391239 idmsRules []* apicfgv1.ImageDigestMirrorSet
12401240 itmsRules []* apicfgv1.ImageTagMirrorSet
1241- clusterImagePolicies []* apicfgv1alpha1 .ClusterImagePolicy
1242- imagePolicies []* apicfgv1alpha1 .ImagePolicy
1241+ clusterImagePolicies []* apicfgv1 .ClusterImagePolicy
1242+ imagePolicies []* apicfgv1 .ImagePolicy
12431243 imagePolicyNamespaces int
12441244 }{
12451245 {
@@ -1268,10 +1268,10 @@ func TestRunImageBootstrap(t *testing.T) {
12681268 },
12691269 },
12701270 {
1271- clusterImagePolicies : []* apicfgv1alpha1 .ClusterImagePolicy {
1271+ clusterImagePolicies : []* apicfgv1 .ClusterImagePolicy {
12721272 & testClusterImagePolicy ,
12731273 },
1274- imagePolicies : []* apicfgv1alpha1 .ImagePolicy {
1274+ imagePolicies : []* apicfgv1 .ImagePolicy {
12751275 & testImagePolicy ,
12761276 },
12771277 imagePolicyNamespaces : 1 ,
0 commit comments