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:
parent
ecb1ce8135
commit
627e8a250e
|
@ -54,7 +54,5 @@ class PytestTestRunner: # pragma: no cover
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
if any("tests/e2e" in label for label in test_labels):
|
|
||||||
self.args.append("-pno:randomly")
|
|
||||||
self.args.extend(test_labels)
|
self.args.extend(test_labels)
|
||||||
return pytest.main(self.args)
|
return pytest.main(self.args)
|
||||||
|
|
|
@ -166,6 +166,10 @@ class TestProviderLDAP(SeleniumTestCase):
|
||||||
@reconcile_app("authentik_outposts")
|
@reconcile_app("authentik_outposts")
|
||||||
def test_ldap_bind_search(self):
|
def test_ldap_bind_search(self):
|
||||||
"""Test simple bind + search"""
|
"""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()
|
outpost = self._prepare()
|
||||||
server = Server("ldap://localhost:3389", get_info=ALL)
|
server = Server("ldap://localhost:3389", get_info=ALL)
|
||||||
_connection = Connection(
|
_connection = Connection(
|
||||||
|
@ -187,8 +191,6 @@ class TestProviderLDAP(SeleniumTestCase):
|
||||||
)
|
)
|
||||||
|
|
||||||
embedded_account = Outpost.objects.filter(managed=MANAGED_OUTPOST).first().user
|
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(
|
_connection.search(
|
||||||
"ou=Users,DC=ldaP,dc=goauthentik,dc=io",
|
"ou=Users,DC=ldaP,dc=goauthentik,dc=io",
|
||||||
|
|
Reference in New Issue