Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: in-memory ldap server runs on a random port #3202

Merged

Conversation

Kehrlann
Copy link
Contributor

Context

We want to run tests in parallel on local machines. But there are conflicts with some in-memory LDAP servers trying to bind to the same port.

This PR reworks InMemoryLdapServer so that it binds to a random port. To make the expected behavior clearer, the server now either listens on ldap:// OR ldaps://, but not both.

Notes

  • Removed duplicate test ableToConnectToLdapWithInvalidSsl_WithSkipValidation
  • Reworked the API of the in-memory LDAP server to be simpler:
    • InMemoryLdapServer#startLdap()
    • InMemoryLdapServer#startLdapWithTls(keystore)
    • server.getUrl()

- This will allow tests to run in parallel without having LDAP servers
  competing for the same port.
@strehle strehle merged commit 5d64cf4 into cloudfoundry:develop Dec 19, 2024
22 checks passed
@Kehrlann Kehrlann deleted the dgarnier/test-ldap-random-port branch December 19, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants