Skip to content

Commit

Permalink
Remove conditionalization from Wiremock section
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfedh committed Jul 18, 2024
1 parent 03f72f7 commit 9d7c20f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,6 @@ testImplementation("net.sourceforge.htmlunit:htmlunit")
testImplementation("io.quarkus:quarkus-junit5")
----

ifndef::no-deprecated-test-resource[]
[[code-flow-integration-testing-wiremock]]

Check warning on line 1712 in docs/src/main/asciidoc/security-oidc-code-flow-authentication.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Spelling] Use correct American English spelling. Did you really mean 'Wiremock'? Raw Output: {"message": "[Quarkus.Spelling] Use correct American English spelling. Did you really mean 'Wiremock'?", "location": {"path": "docs/src/main/asciidoc/security-oidc-code-flow-authentication.adoc", "range": {"start": {"line": 1712, "column": 15}}}, "severity": "WARNING"}
=== Wiremock

Expand Down Expand Up @@ -1796,7 +1795,6 @@ The user `admin` has the `user` and `admin` roles by default - it can be customi
Additionally, `OidcWiremockTestResource` sets the token issuer and audience to `https://service.example.com`, which can be customized with `quarkus.test.oidc.token.issuer` and `quarkus.test.oidc.token.audience` system properties.

`OidcWiremockTestResource` can be used to emulate all OIDC providers.
endif::no-deprecated-test-resource[]

[[code-flow-integration-testing-keycloak-devservices]]

Check warning on line 1799 in docs/src/main/asciidoc/security-oidc-code-flow-authentication.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Headings] Use sentence-style capitalization in 'Dev Services for Keycloak'. Raw Output: {"message": "[Quarkus.Headings] Use sentence-style capitalization in 'Dev Services for Keycloak'.", "location": {"path": "docs/src/main/asciidoc/security-oidc-code-flow-authentication.adoc", "range": {"start": {"line": 1799, "column": 16}}}, "severity": "INFO"}
=== Dev Services for Keycloak
Expand All @@ -1823,7 +1821,6 @@ If a custom realm file has to be imported into Keycloak before running the tests
quarkus.keycloak.devservices.realm-path=quarkus-realm.json
----

Check warning on line 1822 in docs/src/main/asciidoc/security-oidc-code-flow-authentication.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'.", "location": {"path": "docs/src/main/asciidoc/security-oidc-code-flow-authentication.adoc", "range": {"start": {"line": 1822, "column": 3}}}, "severity": "INFO"}

ifndef::no-deprecated-test-resource[]
Finally, write a test code the same way as it is described in the <<code-flow-integration-testing-wiremock,Wiremock>> section.
The only difference is that `@WithTestResource` is no longer needed:

Expand All @@ -1833,7 +1830,6 @@ The only difference is that `@WithTestResource` is no longer needed:
public class CodeFlowAuthorizationTest {
}
----
endif::no-deprecated-test-resource[]

ifndef::no-deprecated-test-resource[]
[[code-flow-integration-testing-keycloak]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,6 @@ Start by adding the following dependencies to your test project:
</dependency>
----

ifndef::no-deprecated-test-resource[]
[[oidc-client-ref-integration-testing-wiremock]]
==== Wiremock

Check warning on line 956 in docs/src/main/asciidoc/security-openid-connect-client-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Spelling] Use correct American English spelling. Did you really mean 'Wiremock'? Raw Output: {"message": "[Quarkus.Spelling] Use correct American English spelling. Did you really mean 'Wiremock'?", "location": {"path": "docs/src/main/asciidoc/security-openid-connect-client-reference.adoc", "range": {"start": {"line": 956, "column": 6}}}, "severity": "WARNING"}

Expand Down Expand Up @@ -1042,7 +1041,6 @@ quarkus.oidc-client.grant-options.password.password=alice
----

And finally, write the test code. Given the Wiremock-based resource above, the first test invocation should return the `access_token_1` access token, which will expire in 4 seconds. Use `awaitility` to wait for about 5 seconds, and now the next test invocation should return the `access_token_2` access token, which confirms the expired `access_token_1` access token has been refreshed.
endif::no-deprecated-test-resource[]

==== Keycloak

Expand Down

0 comments on commit 9d7c20f

Please sign in to comment.