-
Notifications
You must be signed in to change notification settings - Fork 0
Tests #113
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
base: dev
Are you sure you want to change the base?
Tests #113
Conversation
There was a problem hiding this comment.
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 adds comprehensive test infrastructure for the LDAP gateway project, implementing unit tests, integration tests, and SSSD integration tests. The changes include Jest configuration, test utilities, mock providers, and extensive test coverage for authentication, directory backends, and security features.
Key Changes
- Added Jest test framework configuration for both npm core package and server
- Created test utilities (TestServer, LdapTestClient, dbSeeder, mockLogger)
- Implemented unit tests for utilities, interfaces, and LdapEngine
- Added integration tests for SQL, MongoDB, and Proxmox backends
- Added SSSD integration tests with Docker Compose setup
Reviewed changes
Copilot reviewed 43 out of 44 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| npm/jest.config.js | Jest configuration for core package with coverage thresholds |
| npm/package.json | Added Jest dependencies and test scripts |
| npm/test/unit/utils/*.test.js | Unit tests for ldapUtils, filterUtils, errorUtils |
| npm/test/unit/interfaces/*.test.js | Unit tests for AuthProvider and DirectoryProvider |
| npm/test/unit/LdapEngine.test.js | Unit tests for LDAP engine lifecycle |
| npm/test/fixtures/*.js | Mock providers and shared test data fixtures |
| server/jest.config.js | Jest configuration for server integration tests |
| server/package.json | Added Jest and moved sequelize/sqlite to devDependencies |
| server/test/setup.js | Global test setup for server integration tests |
| server/test/utils/*.js | Test utilities (TestServer, LdapTestClient, dbSeeder, mockLogger) |
| server/test/fixtures/testData.js | Shared test data for integration tests |
| server/test/integration/auth/*.test.js | Auth backend integration tests (SQL, MongoDB, Proxmox) |
| server/test/integration/directory/*.test.js | Directory backend integration tests |
| server/test/integration/engine/*.test.js | Engine-level integration tests |
| server/test/integration/security/*.test.js | TLS policy and security tests |
| server/test/integration-sssd/* | SSSD integration test setup with Docker |
| server/utils/ldapUtils.js | Updated defaults for mail and surname fields |
| server/backends/proxmox.*.js | Added enabled/expire field support |
| server/db/drivers/mongoDb.js | Added connection checks and field normalization |
| npm/src/utils/ldapUtils.js | Support for both mail/email fields and login_shell |
| npm/src/utils/filterUtils.js | Fixed cn= filter handling for groups |
| npm/src/LdapEngine.js | Added cn filtering in mixed search requests |
| .github/workflows/ci.yml | Added MongoDB service and SSSD integration tests |











Test Infrastructure
Test Coverage
Test Organization