<commit_before># Vert.x OAuth2 Auth

Please see the documentation for more information.

## Running test

There is a Keycloak Docker image available, that you can load with the provided configuration `src/test/fixtures/vertx-test-realm.json`

```
docker run -d --rm --name keycloak -p 8888:8080 -e KEYCLOAK_USER=user -e KEYCLOAK_PASSWORD=password -e DB_VENDOR=H2 jboss/keycloak
```

But you can simply run `mvn test`, since the Keycloak responses are mocked with a Web Server started in the test setup.


### IntelliJ IDE

In IntelliJ IDE, you have to uncheck `argLine` in Preferences -> Build,Execution,Deployment -> Build Tools -> Maven -> Running Tests ...

to avoid `IntelliJ Error when running unit test: Could not find or load main class ${surefireArgLine}`

- https://github.com/vert-x3/vertx-ext-parent/issues/7
- https://stackoverflow.com/questions/24115142/intellij-error-when-running-unit-test-could-not-find-or-load-main-class-suref 

<commit_msg>Document how to run the Integration Tests<commit_after># Vert.x OAuth2 Auth

Please see the documentation for more information.

## Running test

Standard unit tests are run against a mock of some providers, `Google`, `Keycloak` to run
against a real provider (`Keycloak`) the `IT` profile must be enabled, which you can do by:

```
mvn -PIT ...
```

Or by having the environment variable `TRAVIS` set to `true`. When running the integration
tests you must have a local keycloak installed with the configuration file `src/test/fixtures/vertx-test-realm.json`.

And the container can be run locally as:

```
# build the image if not present
docker build -t vertx-test-keycloak src/test/fixtures
# run once there is a image
docker run -d -p 8888:8080 vertx-test-keycloak
```

### IntelliJ IDE

In IntelliJ IDE, you have to uncheck `argLine` in Preferences -> Build,Execution,Deployment -> Build Tools -> Maven -> Running Tests ...

to avoid `IntelliJ Error when running unit test: Could not find or load main class ${surefireArgLine}`

- https://github.com/vert-x3/vertx-ext-parent/issues/7
- https://stackoverflow.com/questions/24115142/intellij-error-when-running-unit-test-could-not-find-or-load-main-class-suref 


{'fraction_non_alphanumeric': 0.10206896551724139, 'fraction_numerical': 0.01793103448275862, 'mean_word_length': 4.193317422434368, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2620732', 'n_tokens_mistral': 718, 'n_tokens_neox': 669, 'n_words': 248}