Skip to content

Commit

Permalink
Adapt the OicAuthPluginTest to the changes in the describables
Browse files Browse the repository at this point in the history
  • Loading branch information
fcojfernandez committed Sep 20, 2024
1 parent ef57fb3 commit ce6c12e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public void configureClient(String clientId, String clientSecret) {
control("clientSecret").set(clientSecret);
}

public void setAutomaticConfiguration(String wellKnownEndpoint) {
control(by.radioButton("Automatic configuration")).click();
control("wellKnownOpenIDConfigurationUrl").set(wellKnownEndpoint);
public void setWellKnownEndpoint(String wellKnownEndpoint) {
control("").select("Discovery via well-known endpoint"); // Select doesn't have the relative path, directly path=/securityRealm/
control("serverConfiguration/wellKnownOpenIDConfigurationUrl").set(wellKnownEndpoint);
}

public void setLogoutFromOpenidProvider(boolean logout) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/plugins/OicAuthPluginTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ private void configureRealm() {
sc.open();
OicAuthSecurityRealm securityRealm = sc.useRealm(OicAuthSecurityRealm.class);
securityRealm.configureClient(CLIENT, CLIENT);
securityRealm.setAutomaticConfiguration(
securityRealm.setWellKnownEndpoint(
String.format("%s/realms/%s/.well-known/openid-configuration", keycloakUrl, REALM));
securityRealm.setLogoutFromOpenidProvider(true);
securityRealm.setPostLogoutUrl(jenkins.url("OicLogout").toExternalForm());
Expand Down

0 comments on commit ce6c12e

Please sign in to comment.