mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[PR #1315] [MERGED] Move LDAP search tests to their respective implementation files #1252
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#1252
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/lldap/lldap/pull/1315
Author: @Copilot
Created: 10/4/2025
Status: ✅ Merged
Merged: 10/9/2025
Merged by: @nitnelave
Base:
main← Head:copilot/fix-3ad1040b-dda7-4fe2-8342-088c424ac0ab📝 Commits (6)
789483bInitial plana6397a0Split root_dse and subschema tests into dedicated modules09771bbFix unused imports in tests modulebd8decdMove user and group tests to their respective implementation files69ba493Add blank lines between tests in search.rs4eb9171Run cargo fmt to reformat code📊 Changes
3 files changed (+700 additions, -736 deletions)
View changed files
📝
crates/ldap/src/core/group.rs(+302 -0)📝
crates/ldap/src/core/user.rs(+371 -0)📝
crates/ldap/src/search.rs(+27 -736)📄 Description
Move LDAP search tests to their respective implementation files
Problem
Tests for LDAP search functionality were all located in
search.rs, making it difficult to find and maintain tests when modifying user or group-specific functionality in separate files (core/user.rs,core/group.rs).Solution
Reorganized tests to be in the same files as their implementations:
User tests →
core/user.rs(6 tests)test_search_regular_user- Tests user search with regular permissionstest_search_readonly_user- Tests user search with readonly permissionstest_search_member_of- Tests memberOf attribute for userstest_search_user_as_scope- Tests searching with user as base DNtest_search_users- Tests general user listing and conversiontest_pwd_changed_time_format- Tests password modification timestamp formatGroup tests →
core/group.rs(6 tests)test_search_groups- Tests general group listing and conversiontest_search_groups_by_groupid- Tests group search by IDtest_search_groups_filter- Tests complex group filter logictest_search_groups_filter_2- Tests OR filter for groupstest_search_groups_filter_3- Tests NOT filter for groupstest_search_group_as_scope- Tests searching with group as base DNTests remaining in
search.rs(19 tests)Benefits
Testing
All existing tests pass without modification:
Test output now shows organized module structure:
Fixes lldap/lldap#1314
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.