ldap-test-server-cli

Crates.ioldap-test-server-cli
lib.rsldap-test-server-cli
version0.1.2
sourcesrc
created_at2023-03-30 11:03:11.318933
updated_at2024-11-10 20:29:47.237268
descriptionCommand line for running OpenLDAP server for testing
homepage
repositoryhttps://gitlab.com/mateuszkj/ldap-test-server
max_upload_size
id824969
size47,442
(mateuszkj)

documentation

README

Run local LDAP server for integration testing

This tool allow to start local OpenLDAP (slapd) server for integration tests.

OpenLDAP server is created in temporary directory and uses random free port.

Installation

Deepness (Ubuntu)

DEBIAN_FRONTEND=noninteractive sudo apt-get install -y slapd ldap-utils openssl
sudo systemctl stop slapd
sudo systemctl disable slapd
sudo ln -s /etc/apparmor.d/usr.sbin.slapd /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.slapd

Install via cargo cargo install ldap-test-server-cli

Run server

ldap-test-server-cli -b "dc=planetexpress,dc=com" 

Example

You can find in example directory

Usage

Usage: ldap-test-server-cli [OPTIONS]

Options:
  -b, --base-dn <BASE_DN>        Base DN [default: dc=planetexpress,dc=com]
      --bind-addr <BIND_ADDR>    Bind ldap server on address
      --port <PORT>              Port of ldap server
      --ssl-port <SSL_PORT>      Port of ldaps server
  -s, --schema-dir <SCHEMA_DIR>  Directory of ldif files with schema which be installed in database 0
  -d, --data-dir <DATA_DIR>      Directory of ldif files with data which be installed in database 1
  -h, --help                     Print help
  -V, --version                  Print version

License

Licensed under either of:

Commit count: 28

cargo fmt