diff options
author | illustris <rharikrishnan95@gmail.com> | 2022-10-09 18:48:11 +0530 |
---|---|---|
committer | illustris <rharikrishnan95@gmail.com> | 2022-10-10 03:48:52 +0530 |
commit | 51b9e2857f057308ce9c95b8d3440b59ab7d617d (patch) | |
tree | 85fa12c309274d009f1b32a7dc7fb3d0a2f4138a | |
parent | 7338069be813d94aec2d09eba6df7bb681bfd5f9 (diff) | |
download | nixpkgs-51b9e2857f057308ce9c95b8d3440b59ab7d617d.tar nixpkgs-51b9e2857f057308ce9c95b8d3440b59ab7d617d.tar.gz nixpkgs-51b9e2857f057308ce9c95b8d3440b59ab7d617d.tar.bz2 nixpkgs-51b9e2857f057308ce9c95b8d3440b59ab7d617d.tar.lz nixpkgs-51b9e2857f057308ce9c95b8d3440b59ab7d617d.tar.xz nixpkgs-51b9e2857f057308ce9c95b8d3440b59ab7d617d.tar.zst nixpkgs-51b9e2857f057308ce9c95b8d3440b59ab7d617d.zip |
nixos/sssd: fix race condition in test
-rw-r--r-- | nixos/tests/sssd-ldap.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nixos/tests/sssd-ldap.nix b/nixos/tests/sssd-ldap.nix index 27dce6ceb98..ff83e96068a 100644 --- a/nixos/tests/sssd-ldap.nix +++ b/nixos/tests/sssd-ldap.nix @@ -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}") ''; }) |