8000 Pass URL without trailing slashes to admin client by jonkoops · Pull Request #218 · keycloak/keycloak-js · GitHub
[go: up one dir, main page]

Skip to content

Pass URL without trailing slashes to admin client - #218

Merged
jonkoops merged 1 commit into
keycloak:mainfrom
jonkoops:fix-tests
Nov 18, 2025
Merged

jonkoops merged 1 commit into
keycloak:mainfrom
jonkoops:fix-tests

Conversation

@jonkoops
Copy link
Copy Markdown
Contributor

Removes the trailing slash from URLs passed into the admin client used by the test suite, this prevents issues where the trailing slash can be duplicated in the request, causing failures.

Closes #217

Copilot AI left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aims to fix issues with the admin client in the test suite by removing trailing slashes from URLs before passing them to the Keycloak admin client, preventing request failures caused by duplicate slashes.

Key Changes

  • Added logic to detect and remove trailing slashes from AUTH_SERVER_URL before passing it to the admin client
  • Added realmName: 'master' configuration to the admin client initialization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/support/admin-client.ts Resolved
Comment thread test/support/admin-client.ts Resolved
Closes keycloak#217

Signed-off-by: Jon Koops <jonkoops@gmail.com>
Copilot AI left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rmartinc rmartinc left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes @jonkoops! You are right and probably we should change the admin client to remove the trailing slash too. But this changes makes no harm at all. Thanks!

@jonkoops
jonkoops merged commit b1a22a5 into keycloak:main Nov 18, 2025
@jonkoops
jonkoops deleted the fix-tests branch November 18, 2025 11:46
@jonkoops
Copy link
Copy Markdown
Contributor Author

Great, thanks for the review @rmartinc!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests are failing due to malformed URLs

3 participants

0