tests: run e2e tests in random order (#4550)

* run e2e tests randomly

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix test_ldap_bind_search

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L 2023-01-27 23:57:53 +01:00 committed by GitHub
parent ecb1ce8135
commit 627e8a250e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -54,7 +54,5 @@ class PytestTestRunner: # pragma: no cover
import pytest
if any("tests/e2e" in label for label in test_labels):
self.args.append("-pno:randomly")
self.args.extend(test_labels)
return pytest.main(self.args)

View file

@ -166,6 +166,10 @@ class TestProviderLDAP(SeleniumTestCase):
@reconcile_app("authentik_outposts")
def test_ldap_bind_search(self):
"""Test simple bind + search"""
# Remove akadmin to ensure list is correct
# Remove user before starting container so it's not cached
User.objects.filter(username="akadmin").delete()
outpost = self._prepare()
server = Server("ldap://localhost:3389", get_info=ALL)
_connection = Connection(
@ -187,8 +191,6 @@ class TestProviderLDAP(SeleniumTestCase):
)
embedded_account = Outpost.objects.filter(managed=MANAGED_OUTPOST).first().user
# Remove akadmin to ensure list is correct
User.objects.filter(username="akadmin").delete()
_connection.search(
"ou=Users,DC=ldaP,dc=goauthentik,dc=io",