core: add fallback URLs for websocket to cleanup test logs

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-06-03 17:20:44 +02:00
parent 290ebef8e3
commit 5e3628bea6
4 changed files with 7 additions and 11 deletions

View File

@ -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

View File

@ -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"),
),
]

View File

@ -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()

View File

@ -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)