Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
26 lines
682 B
Nix
26 lines
682 B
Nix
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')
|
|
)
|
|
'';
|
|
})
|