From 9e166d7723dbaa14e11a5986c958dd29a03170e7 Mon Sep 17 00:00:00 2001
From: Sven-Torben Janus <sven-torben@sven-torben.de>
Date: Wed, 15 Jan 2025 23:42:29 +0100
Subject: [PATCH] test: Fix issue with realm import

The file had the wrong name. The import mechanism assumes that the file
follows the pattern <realm name>-realm.json. In our case <realm name> is
'test-realm', so the correct filename is test-realm-realm.json and not
test-realm.json.
---
 .../keycloak/authorization/client/ClientPolicyIT.java           | 2 +-
 .../de/sventorben/keycloak/authorization/client/LoginIT.java    | 2 +-
 src/test/resources/{test-realm.json => test-realm-realm.json}   | 0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename src/test/resources/{test-realm.json => test-realm-realm.json} (100%)
 mode change 100755 => 100644

diff --git a/src/test/java/de/sventorben/keycloak/authorization/client/ClientPolicyIT.java b/src/test/java/de/sventorben/keycloak/authorization/client/ClientPolicyIT.java
index 61c1457..99d641f 100755
--- a/src/test/java/de/sventorben/keycloak/authorization/client/ClientPolicyIT.java
+++ b/src/test/java/de/sventorben/keycloak/authorization/client/ClientPolicyIT.java
@@ -36,7 +36,7 @@ class ClientPolicyIT {
     private static final KeycloakContainer KEYCLOAK_CONTAINER = FullImageName.createContainer()
         .withExposedPorts(KEYCLOAK_HTTP_PORT)
         .withLogConsumer(new Slf4jLogConsumer(LOGGER).withSeparateOutputStreams())
-        .withRealmImportFile("/test-realm.json")
+        .withRealmImportFile("/test-realm-realm.json")
         .withStartupTimeout(Duration.ofSeconds(90));
 
     @BeforeAll
diff --git a/src/test/java/de/sventorben/keycloak/authorization/client/LoginIT.java b/src/test/java/de/sventorben/keycloak/authorization/client/LoginIT.java
index 2758ea3..0d24269 100755
--- a/src/test/java/de/sventorben/keycloak/authorization/client/LoginIT.java
+++ b/src/test/java/de/sventorben/keycloak/authorization/client/LoginIT.java
@@ -35,7 +35,7 @@ class LoginIT {
     private static final KeycloakContainer KEYCLOAK_CONTAINER = FullImageName.createContainer()
         .withExposedPorts(KEYCLOAK_HTTP_PORT)
         .withLogConsumer(new Slf4jLogConsumer(LOGGER).withSeparateOutputStreams())
-        .withRealmImportFile("/test-realm.json")
+        .withRealmImportFile("/test-realm-realm.json")
         .withStartupTimeout(Duration.ofSeconds(90));
 
     @BeforeAll
diff --git a/src/test/resources/test-realm.json b/src/test/resources/test-realm-realm.json
old mode 100755
new mode 100644
similarity index 100%
rename from src/test/resources/test-realm.json
rename to src/test/resources/test-realm-realm.json