diff --git a/.gitignore b/.gitignore index b8e2817d4cd..b68f39bdeae 100644 --- a/.gitignore +++ b/.gitignore @@ -96,4 +96,4 @@ quarkus/data/*.db .java-version .env -.env-test +.env.test diff --git a/test-framework/README.md b/test-framework/README.md index e0bec8ac93a..25d7e5fb959 100644 --- a/test-framework/README.md +++ b/test-framework/README.md @@ -254,7 +254,7 @@ There are a few options on how to configure the test framework, with the followi * System properties * Environment variables -* `.env-test` file in the project hierarchy +* `.env.test` file in the project hierarchy * A properties file specified with `kc.test.config` system property or `KC_TEST_CONFIG` environment variable ### Using system properties @@ -291,18 +291,18 @@ KC_TEST_BROWSER=firefox mvn test As with system properties, using environment variables within the IDE can be cumbersome. -### Using `.env-test` file +### Using `.env.test` file -When running tests from an IDE using the `.env-test` file is very convenient, especially as this can be added to `.gitignore` +When running tests from an IDE using the `.env.test` file is very convenient, especially as this can be added to `.gitignore` allowing developers to quickly have their own personal preference when running tests. -Example `.env-test` file: +Example `.env.test` file: ``` KC_TEST_BROWSER=firefox ``` -For multi-modal Maven projects the `.env-test` file can be located in the current module, or one of its parent modules. +For multi-modal Maven projects the `.env.test` file can be located in the current module, or one of its parent modules. This allows sharing configuration across multiple test modules. ### Using a properties file diff --git a/test-framework/core/src/main/java/org/keycloak/testframework/config/Config.java b/test-framework/core/src/main/java/org/keycloak/testframework/config/Config.java index d43945a36cd..9cedb273a95 100644 --- a/test-framework/core/src/main/java/org/keycloak/testframework/config/Config.java +++ b/test-framework/core/src/main/java/org/keycloak/testframework/config/Config.java @@ -90,7 +90,7 @@ public class Config { private static ConfigSource initTestEnvConfigSource() { Path currentPath = Paths.get(System.getProperty("user.dir")); while (Files.isDirectory(currentPath)) { - Path envTestPath = currentPath.resolve(".env-test"); + Path envTestPath = currentPath.resolve(".env.test"); if (Files.isRegularFile(envTestPath)) { try { return new EnvConfigSource(ConfigSourceUtil.urlToMap(envTestPath.toUri().toURL()), 350);