Skip to content

test: start the LDAP directory once - #346

Merged
fjlopez merged 3 commits into
devfrom
test/319-ldap-restart
Oct 21, 2026
Merged

fjlopez merged 3 commits into
devfrom
test/319-ldap-restart

Conversation

@fjlopez

@fjlopez fjlopez commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Why

AuthenticationControllerLdapEnabledTest started and stopped the in-memory LDAP directory before every test. roleLookupDataAccessFailureReturnsUnauthorized accepted HTTP 401 and no cookie even when LdapUserAuthoritiesPopulator never ran, because a bcrypt rejection of password12 produces the same result.

What changed

The directory now starts once for the class. The role-lookup case still returns HTTP 401 and no cookie, and the test fails unless that rejection happens inside LdapUserAuthoritiesPopulator. Successful internal / password12 login is unchanged and still depends on the LDAP bind. The other LDAP login cases stay in place.

Scope

Test-only change in AuthenticationControllerLdapEnabledTest, plus the [Unreleased] changelog note for #319.

Blast Radius

LDAP authentication behavior is unchanged. This class binds port 8389 once instead of once per test. AuthenticationControllerLdapMailTest is unchanged.

Verification

Focused AuthenticationControllerLdapEnabledTest and AuthenticationControllerLdapMailTest passed on Java 17. The pre-commit hook ran spotlessCheck, the full test suite, and jacocoTestReport.

Fixes #319

@fjlopez
fjlopez merged commit d0b7361 into dev Oct 21, 2026
1 check passed
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.

1 participant