mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
Rename .env-test to .env.test (#36975)
Closes: #36974 Signed-off-by: Simon Vacek <simonvacky@email.cz>
This commit is contained in:
parent
b2e8942dd1
commit
d522fd265d
2
.gitignore
vendored
2
.gitignore
vendored
@ -96,4 +96,4 @@ quarkus/data/*.db
|
||||
.java-version
|
||||
|
||||
.env
|
||||
.env-test
|
||||
.env.test
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user