[pbs-devel] [PATCH proxmox 2/4] ldap: add check_connection function

Lukas Wagner l.wagner at proxmox.com
Mon Jun 26 14:23:12 CEST 2023


Hello,

On 6/26/23 11:39, Stefan Sterz wrote:
> +    /// Helper to check if a connection with the current configuration is possible.
> +    ///
> +    /// This performs a search with the current configuration. If the search succeeds `Ok(()) is
> +    /// returned, otherwise an `Error` is returned.
> +    pub async fn check_connection(&self) -> Result<(), Error> {

The `proxmox-ldap` crate actually has some integration tests, running tests against a
real LDAP server (glauth). For reference, take a look at `tests/glauth.rs` and
`tests/run_integration_tests.sh`. They are ignored by default, since they require the
`glauth` binary in your `PATH`.

It would be cool if you could add some tests for this new function. Can of course happen in a
followup patch! :)


-- 
- Lukas





More information about the pbs-devel mailing list