tests/e2e: fix static user checks
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
75724b6f8d
commit
29b7368f42
|
@ -82,7 +82,6 @@ class TestProviderProxy(SeleniumTestCase):
|
|||
type=OutpostType.PROXY,
|
||||
)
|
||||
outpost.providers.add(proxy)
|
||||
outpost.save()
|
||||
outpost.build_user_permissions(outpost.user)
|
||||
|
||||
self.proxy_container = self.start_proxy(outpost)
|
||||
|
@ -102,7 +101,7 @@ class TestProviderProxy(SeleniumTestCase):
|
|||
sleep(1)
|
||||
|
||||
full_body_text = self.driver.find_element(By.CSS_SELECTOR, "pre").text
|
||||
self.assertIn("X-Forwarded-Preferred-Username: akadmin", full_body_text)
|
||||
self.assertIn(f"X-authentik-username: {self.user.username}", full_body_text)
|
||||
self.assertIn("X-Foo: bar", full_body_text)
|
||||
|
||||
self.driver.get("http://localhost:9000/akprox/sign_out")
|
||||
|
@ -145,7 +144,6 @@ class TestProviderProxyConnect(ChannelsLiveServerTestCase):
|
|||
_config=asdict(OutpostConfig(authentik_host=self.live_server_url, log_level="debug")),
|
||||
)
|
||||
outpost.providers.add(proxy)
|
||||
outpost.save()
|
||||
outpost.build_user_permissions(outpost.user)
|
||||
|
||||
# Wait until outpost healthcheck succeeds
|
||||
|
|
|
@ -156,6 +156,7 @@ class TestSourceSAML(SeleniumTestCase):
|
|||
User.objects.exclude(username="akadmin")
|
||||
.exclude(username__startswith="ak-outpost")
|
||||
.exclude(pk=get_anonymous_user().pk)
|
||||
.exclude(pk=self.user.pks)
|
||||
.first()
|
||||
)
|
||||
|
||||
|
@ -235,6 +236,7 @@ class TestSourceSAML(SeleniumTestCase):
|
|||
User.objects.exclude(username="akadmin")
|
||||
.exclude(username__startswith="ak-outpost")
|
||||
.exclude(pk=get_anonymous_user().pk)
|
||||
.exclude(pk=self.user.pks)
|
||||
.first()
|
||||
)
|
||||
|
||||
|
@ -301,5 +303,6 @@ class TestSourceSAML(SeleniumTestCase):
|
|||
User.objects.exclude(username="akadmin")
|
||||
.exclude(username__startswith="ak-outpost")
|
||||
.exclude(pk=get_anonymous_user().pk)
|
||||
.exclude(pk=self.user.pks)
|
||||
.first()
|
||||
)
|
||||
|
|
Reference in New Issue