nixos/sssd: fix race condition in test

This commit is contained in:
illustris 2022-10-09 18:48:11 +05:30
parent 7338069be8
commit 51b9e2857f
No known key found for this signature in database
GPG key ID: 56C8FC0B899FEFA3

View file

@ -91,6 +91,11 @@ in import ./make-test-python.nix ({pkgs, ...}: {
machine.start()
machine.wait_for_unit("openldap.service")
machine.wait_for_unit("sssd.service")
machine.succeed("getent passwd ${testUser}")
result = machine.execute("getent passwd ${testUser}")
if result[0] == 0:
assert "${testUser}" in result[1]
else:
machine.wait_for_console_text("Backend is online")
machine.succeed("getent passwd ${testUser}")
'';
})