Rename .env-test to .env.test (#36975)

Closes: #36974

Signed-off-by: Simon Vacek <simonvacky@email.cz>
This commit is contained in:
Šimon Vacek 2025-02-03 07:41:56 +01:00 committed by GitHub
parent b2e8942dd1
commit d522fd265d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

2
.gitignore vendored
View File

@ -96,4 +96,4 @@ quarkus/data/*.db
.java-version
.env
.env-test
.env.test

View File

@ -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

View File

@ -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);