@@ -51,11 +51,12 @@ func TestDRGReconciliation(t *testing.T) {
5151 client := fake .NewClientBuilder ().Build ()
5252 ociCluster = infrastructurev1beta1.OCICluster {
5353 ObjectMeta : metav1.ObjectMeta {
54- UID : "a " ,
54+ UID : "cluster_uid " ,
5555 Name : "cluster" ,
5656 },
5757 Spec : infrastructurev1beta1.OCIClusterSpec {
58- CompartmentId : "compartment-id" ,
58+ CompartmentId : "compartment-id" ,
59+ OCIResourceIdentifier : "resource_uid" ,
5960 },
6061 }
6162 ociCluster .Spec .ControlPlaneEndpoint .Port = 6443
@@ -66,8 +67,8 @@ func TestDRGReconciliation(t *testing.T) {
6667 Client : client ,
6768 })
6869 tags = make (map [string ]string )
69- tags [" CreatedBy" ] = " OCIClusterAPIProvider"
70- tags ["ClusterUUID" ] = "a "
70+ tags [ociutil . CreatedBy ] = ociutil . OCIClusterAPIProvider
71+ tags [ociutil . ClusterResourceIdentifier ] = "resource_uid "
7172 vcnPeering = infrastructurev1beta1.VCNPeering {}
7273 g .Expect (err ).To (BeNil ())
7374 }
@@ -167,8 +168,8 @@ func TestDRGReconciliation(t *testing.T) {
167168 vcnPeering .DRG .Manage = true
168169 vcnPeering .DRG .ID = common .String ("drg-id" )
169170 existingTags := make (map [string ]string )
170- existingTags [" CreatedBy" ] = " OCIClusterAPIProvider"
171- existingTags ["ClusterUUID" ] = "a "
171+ existingTags [ociutil . CreatedBy ] = ociutil . OCIClusterAPIProvider
172+ existingTags [ociutil . ClusterResourceIdentifier ] = "resource_uid "
172173 existingTags ["test" ] = "test"
173174 clusterScope .OCICluster .Spec .NetworkSpec .VCNPeering = & vcnPeering
174175 vcnClient .EXPECT ().GetDrg (gomock .Any (), gomock .Eq (core.GetDrgRequest {
@@ -209,7 +210,7 @@ func TestDRGReconciliation(t *testing.T) {
209210 DefinedTags : make (map [string ]map [string ]interface {}),
210211 DisplayName : common .String ("cluster" ),
211212 },
212- OpcRetryToken : ociutil .GetOPCRetryToken ("%s-%s" , "create-drg" , "a " ),
213+ OpcRetryToken : ociutil .GetOPCRetryToken ("%s-%s" , "create-drg" , "resource_uid " ),
213214 })).
214215 Return (core.CreateDrgResponse {
215216 Drg : core.Drg {
@@ -258,11 +259,12 @@ func TestDRGDeletion(t *testing.T) {
258259 client := fake .NewClientBuilder ().Build ()
259260 ociCluster = infrastructurev1beta1.OCICluster {
260261 ObjectMeta : metav1.ObjectMeta {
261- UID : "a " ,
262+ UID : "cluster_uid " ,
262263 Name : "cluster" ,
263264 },
264265 Spec : infrastructurev1beta1.OCIClusterSpec {
265- CompartmentId : "compartment-id" ,
266+ CompartmentId : "compartment-id" ,
267+ OCIResourceIdentifier : "resource_uid" ,
266268 },
267269 }
268270 ociCluster .Spec .ControlPlaneEndpoint .Port = 6443
@@ -273,8 +275,8 @@ func TestDRGDeletion(t *testing.T) {
273275 Client : client ,
274276 })
275277 tags = make (map [string ]string )
276- tags [" CreatedBy" ] = " OCIClusterAPIProvider"
277- tags ["ClusterUUID" ] = "a "
278+ tags [ociutil . CreatedBy ] = ociutil . OCIClusterAPIProvider
279+ tags [ociutil . ClusterResourceIdentifier ] = "resource_uid "
278280 vcnPeering = infrastructurev1beta1.VCNPeering {}
279281 g .Expect (err ).To (BeNil ())
280282 }
0 commit comments