Veiko Aasa 78427f730c
users: Fix unit test failures when LDAP is empty
When LDAP is set up but the first admin is not yet set up, some of the
users module tests fail because known admin users is deleted before other
users. A known admin user must exists to delete existing users.

Fix this by deleting a known admin user only after deleting other users
when cleaning up tests.

Tests performed on Debian stable and testing:
- All the users module unit tests pass:
  - when LDAP is not set up yet
  - after LDAP is set up but empty
  - after first admin user has set up using the web UI

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-03-20 10:18:31 -04:00
..
2020-02-19 14:38:55 +02:00