Skip to content

Commit

Permalink
Merge pull request quarkusio#14371 from sberyozkin/oidc_client_token_…
Browse files Browse the repository at this point in the history
…helper

Fix and get OIDC client tests running in CI native builds
  • Loading branch information
gsmet authored Jan 19, 2021
2 parents c53872a + 8a661fb commit a899c1c
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/native-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
{
"category": "Security2",
"timeout": 70,
"test-modules": "oidc oidc-code-flow oidc-tenancy keycloak-authorization oidc-client oidc-wiremock"
"test-modules": "oidc oidc-code-flow oidc-tenancy keycloak-authorization oidc-client oidc-token-propagation oidc-wiremock"
},
{
"category": "Security3",
Expand Down
4 changes: 2 additions & 2 deletions extensions/oidc-client-filter/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<id>test-keycloak</id>
<activation>
<property>
<name>test-keycloak</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand All @@ -118,7 +118,7 @@
<id>docker-keycloak</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down
4 changes: 2 additions & 2 deletions extensions/oidc-client/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<id>test-keycloak</id>
<activation>
<property>
<name>test-keycloak</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand All @@ -142,7 +142,7 @@
<id>docker-keycloak</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

public class TokensHelper {

@SuppressWarnings("unused")
private volatile TokenRequestState tokenRequestState;

private static final AtomicReferenceFieldUpdater<TokensHelper, TokenRequestState> tokenRequestStateUpdater = AtomicReferenceFieldUpdater
.newUpdater(TokensHelper.class, TokenRequestState.class, "tokenRequestState");

Expand Down
4 changes: 2 additions & 2 deletions integration-tests/oidc-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<id>test-keycloak</id>
<activation>
<property>
<name>test-keycloak</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand Down Expand Up @@ -236,7 +236,7 @@
<id>docker-keycloak</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ io.quarkus.it.keycloak.ProtectedResourceServiceRegisterProvider/mp-rest/url=http
io.quarkus.it.keycloak.ProtectedResourceServiceOidcClient/mp-rest/url=http://localhost:8081/protected
io.quarkus.it.keycloak.ProtectedResourceServiceNoOidcClient/mp-rest/url=http://localhost:8081/protected

quarkus.log.category."io.quarkus.oidc.client.runtime.OidcClientImpl".min-level=TRACE
quarkus.log.category."io.quarkus.oidc.client.runtime.OidcClientImpl".level=TRACE
quarkus.log.file.enable=true
quarkus.log.file.format=%C - %s%n
quarkus.log.file.format=%C - %s%n
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ private void checkLog() {
.untilAsserted(new ThrowingRunnable() {
@Override
public void run() throws Throwable {
final Path accessLogFilePath = logDirectory.resolve("quarkus.log");
Path accessLogFilePath = logDirectory.resolve("quarkus.log");
boolean fileExists = Files.exists(accessLogFilePath);
if (!fileExists) {
accessLogFilePath = logDirectory.resolve("target/quarkus.log");
fileExists = Files.exists(accessLogFilePath);
}
Assertions.assertTrue(Files.exists(accessLogFilePath),
"quarkus log file " + accessLogFilePath + " is missing");

Expand Down
4 changes: 2 additions & 2 deletions integration-tests/oidc-token-propagation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
<id>test-keycloak</id>
<activation>
<property>
<name>test-keycloak</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand Down Expand Up @@ -231,7 +231,7 @@
<id>docker-keycloak</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down

0 comments on commit a899c1c

Please sign in to comment.