at 25.11-pre 760 B view raw
1import ./make-test-python.nix ( 2 { ... }: 3 { 4 name = "lldap"; 5 6 nodes.machine = 7 { pkgs, ... }: 8 { 9 services.lldap = { 10 enable = true; 11 settings = { 12 verbose = true; 13 ldap_base_dn = "dc=example,dc=com"; 14 }; 15 }; 16 environment.systemPackages = [ pkgs.openldap ]; 17 }; 18 19 testScript = '' 20 machine.wait_for_unit("lldap.service") 21 machine.wait_for_open_port(3890) 22 machine.wait_for_open_port(17170) 23 24 machine.succeed("curl --location --fail http://localhost:17170/") 25 26 print( 27 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') 28 ) 29 ''; 30 } 31)