nixosTests.lldap: init
This commit is contained in:
parent
87ccd1a47b
commit
5eb2e64d80
3 changed files with 32 additions and 0 deletions
|
@ -379,6 +379,7 @@ in {
|
||||||
limesurvey = handleTest ./limesurvey.nix {};
|
limesurvey = handleTest ./limesurvey.nix {};
|
||||||
listmonk = handleTest ./listmonk.nix {};
|
listmonk = handleTest ./listmonk.nix {};
|
||||||
litestream = handleTest ./litestream.nix {};
|
litestream = handleTest ./litestream.nix {};
|
||||||
|
lldap = handleTest ./lldap.nix {};
|
||||||
locate = handleTest ./locate.nix {};
|
locate = handleTest ./locate.nix {};
|
||||||
login = handleTest ./login.nix {};
|
login = handleTest ./login.nix {};
|
||||||
logrotate = handleTest ./logrotate.nix {};
|
logrotate = handleTest ./logrotate.nix {};
|
||||||
|
|
26
nixos/tests/lldap.nix
Normal file
26
nixos/tests/lldap.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
import ./make-test-python.nix ({ ... }: {
|
||||||
|
name = "lldap";
|
||||||
|
|
||||||
|
nodes.machine = { pkgs, ... }: {
|
||||||
|
services.lldap = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
verbose = true;
|
||||||
|
ldap_base_dn = "dc=example,dc=com";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.systemPackages = [ pkgs.openldap ];
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
machine.wait_for_unit("lldap.service")
|
||||||
|
machine.wait_for_open_port(3890)
|
||||||
|
machine.wait_for_open_port(17170)
|
||||||
|
|
||||||
|
machine.succeed("curl --location --fail http://localhost:17170/")
|
||||||
|
|
||||||
|
print(
|
||||||
|
machine.succeed('ldapsearch -H ldap://localhost:3890 -D uid=admin,ou=people,dc=example,dc=com -b "ou=people,dc=example,dc=com" -w password')
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
})
|
|
@ -2,6 +2,7 @@
|
||||||
, fetchzip
|
, fetchzip
|
||||||
, lib
|
, lib
|
||||||
, lldap
|
, lldap
|
||||||
|
, nixosTests
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -52,6 +53,10 @@ rustPlatform.buildRustPackage rec {
|
||||||
substituteInPlace server/src/infra/tcp_server.rs --subst-var-by frontend '${frontend}'
|
substituteInPlace server/src/infra/tcp_server.rs --subst-var-by frontend '${frontend}'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
inherit (nixosTests) lldap;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A lightweight authentication server that provides an opinionated, simplified LDAP interface for authentication";
|
description = "A lightweight authentication server that provides an opinionated, simplified LDAP interface for authentication";
|
||||||
homepage = "https://github.com/lldap/lldap";
|
homepage = "https://github.com/lldap/lldap";
|
||||||
|
|
Loading…
Reference in a new issue