@@ -33,6 +33,7 @@ import (
33
33
34
34
const (
35
35
ociInfrastructureProviderName = "oci"
36
+ ociInfrastructureProviderCustomName = "my-oci"
36
37
ociInfrastructureProviderVersion = "v0.12.0"
37
38
ociInfrastructureProviderDeploymentName = "capoci-controller-manager"
38
39
compressedAnnotation = "provider.cluster.x-k8s.io/compressed"
@@ -186,11 +187,11 @@ var _ = Describe("Create and delete a provider with manifests that don't fit the
186
187
}, timeout ).Should (Equal (true ))
187
188
})
188
189
189
- It ("should successfully create and delete an InfrastructureProvider for OCI from a pre-created ConfigMap" , func () {
190
+ It ("should successfully create and delete an InfrastructureProvider for OCI with custom name from a pre-created ConfigMap" , func () {
190
191
k8sclient := bootstrapClusterProxy .GetClient ()
191
192
infraProvider := & operatorv1.InfrastructureProvider {
192
193
ObjectMeta : metav1.ObjectMeta {
193
- Name : ociInfrastructureProviderName ,
194
+ Name : ociInfrastructureProviderCustomName ,
194
195
Namespace : operatorNamespace ,
195
196
},
196
197
Spec : operatorv1.InfrastructureProviderSpec {
@@ -219,7 +220,7 @@ var _ = Describe("Create and delete a provider with manifests that don't fit the
219
220
By ("Waiting for the infrastructure provider to be ready" )
220
221
Eventually (func () bool {
221
222
infraProvider := & operatorv1.InfrastructureProvider {}
222
- key := client.ObjectKey {Namespace : operatorNamespace , Name : ociInfrastructureProviderName }
223
+ key := client.ObjectKey {Namespace : operatorNamespace , Name : ociInfrastructureProviderCustomName }
223
224
if err := k8sclient .Get (ctx , key , infraProvider ); err != nil {
224
225
return false
225
226
}
@@ -235,7 +236,7 @@ var _ = Describe("Create and delete a provider with manifests that don't fit the
235
236
By ("Waiting for status.IntalledVersion to be set" )
236
237
Eventually (func () bool {
237
238
infraProvider := & operatorv1.InfrastructureProvider {}
238
- key := client.ObjectKey {Namespace : operatorNamespace , Name : ociInfrastructureProviderName }
239
+ key := client.ObjectKey {Namespace : operatorNamespace , Name : ociInfrastructureProviderCustomName }
239
240
if err := k8sclient .Get (ctx , key , infraProvider ); err != nil {
240
241
return false
241
242
}
@@ -256,8 +257,6 @@ var _ = Describe("Create and delete a provider with manifests that don't fit the
256
257
257
258
Expect (cm .BinaryData [componentsConfigMapKey ]).ToNot (BeEmpty ())
258
259
259
- Expect (k8sclient .Delete (ctx , infraProvider )).To (Succeed ())
260
-
261
260
By ("Waiting for the infrastructure provider deployment to be created" )
262
261
Eventually (func () bool {
263
262
deployment := & appsv1.Deployment {}
@@ -266,6 +265,8 @@ var _ = Describe("Create and delete a provider with manifests that don't fit the
266
265
return k8sclient .Get (ctx , key , deployment ) == nil
267
266
}, timeout ).Should (Equal (true ))
268
267
268
+ Expect (k8sclient .Delete (ctx , infraProvider )).To (Succeed ())
269
+
269
270
By ("Waiting for the infrastructure provider deployment to be deleted" )
270
271
Eventually (func () bool {
271
272
deployment := & appsv1.Deployment {}
0 commit comments