add unit tests for various utility functions,

add integration test for LDAPClient,
add aiutomatic openldap configuration for testing through make,
add make targets for tests
improve make targets for build/clean,
update README with build and test instructions
This commit is contained in:
2025-02-11 07:09:48 +00:00
parent 50ff3b2cfc
commit 5e2c64f9b7
11 changed files with 1617 additions and 6 deletions

View File

@@ -33,4 +33,21 @@ ProxmoxAAS LDAP provides a simple API for managing users and groups in a simplif
- ldapURL: url to the ldap server ie. `ldap://ldap.domain.net`
- baseDN: base DN ie. `dc=domain,dc=net`
- sessionSecretKey: random value used to randomize cookie values, replace with any sufficiently large random string
3. Run the binary
3. Run the binary
## Building and Testing from Source
Building requires the go toolchain. Testing requires the go toolchain, make, and apt. Currently only supports Debian.
### Building from Source
1. Clone the repository
2. Run `go get` to get requirements
3. Run `make` to build the binary
### Testing Source
1. Clone the repository
2. Run `go get` to get requirements
3. Run `make dev-init` to install test requirements including openldap (slapd), ldap-utils, debconf-utils
4. Run `make tests` to run all tests