Skip to content
Snippets Groups Projects
Commit dd55522d authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6686 fix realmExists call

parent 2713b3d2
No related merge requests found
...@@ -69,7 +69,7 @@ public class KeycloakRealmReconciler implements Reconciler<OzgCloudKeycloakRealm ...@@ -69,7 +69,7 @@ public class KeycloakRealmReconciler implements Reconciler<OzgCloudKeycloakRealm
LOG.info("keep data"); LOG.info("keep data");
return DeleteControl.defaultDelete(); return DeleteControl.defaultDelete();
} }
if (!service.realmExists(realm.getMetadata().getName())) { if (!service.realmExists(realm.getMetadata().getNamespace())) {
return DeleteControl.defaultDelete(); return DeleteControl.defaultDelete();
} }
return deleteRealm(realm); return deleteRealm(realm);
......
...@@ -134,7 +134,7 @@ class KeycloakRealmReconcilerTest { ...@@ -134,7 +134,7 @@ class KeycloakRealmReconcilerTest {
void shouldCallRealmExists() { void shouldCallRealmExists() {
reconciler.cleanup(realm, null); reconciler.cleanup(realm, null);
verify(service).realmExists(realm.getMetadata().getName()); verify(service).realmExists(OzgCloudKeycloakRealmTestFactory.METADATA_NAMESPACE);
} }
@Test @Test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment