core: add fallback URLs for websocket to cleanup test logs
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
290ebef8e3
commit
5e3628bea6
|
@ -4,6 +4,7 @@ import uuid
|
|||
|
||||
import django.db.models.deletion
|
||||
from django.apps.registry import Apps
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
|
||||
|
||||
|
|
|
@ -35,4 +35,10 @@ urlpatterns = [
|
|||
ensure_csrf_cookie(TemplateView.as_view(template_name="if/flow.html")),
|
||||
name="if-flow",
|
||||
),
|
||||
# Fallback for WS
|
||||
path("ws/outpost/<uuid:pk>/", TemplateView.as_view(template_name="if/admin.html")),
|
||||
path(
|
||||
"ws/client/",
|
||||
TemplateView.as_view(template_name="if/admin.html"),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -380,7 +380,6 @@ class Outpost(models.Model):
|
|||
tokens = Token.filter_not_expired(
|
||||
identifier=self.token_identifier,
|
||||
intent=TokenIntents.INTENT_API,
|
||||
managed=managed,
|
||||
)
|
||||
if tokens.exists():
|
||||
token = tokens.first()
|
||||
|
|
|
@ -88,16 +88,6 @@ class TestProviderProxy(SeleniumTestCase):
|
|||
|
||||
self.proxy_container = self.start_proxy(outpost)
|
||||
|
||||
# Wait until outpost healthcheck succeeds
|
||||
healthcheck_retries = 0
|
||||
while healthcheck_retries < 50:
|
||||
if len(outpost.state) > 0:
|
||||
state = outpost.state[0]
|
||||
if state.last_seen:
|
||||
break
|
||||
healthcheck_retries += 1
|
||||
sleep(0.5)
|
||||
|
||||
self.driver.get("http://localhost:4180")
|
||||
self.login()
|
||||
sleep(1)
|
||||
|
|
Reference in New Issue