Flowdeck 7.84.13 : tests Hub (résolution draco_urls, marqueurs barre v0.3.0)
This commit is contained in:
@@ -12,7 +12,7 @@ import pytest
|
||||
from app.services import draco_urls
|
||||
|
||||
VARS = ("DRACO_SSO_URL", "DRACO_AGENT_URL", "TIKTAK_URL", "KANBANTE_URL",
|
||||
"SHAARIT_URL", "FLOWDECK_URL", "OAUTH_REDIRECT_URI",
|
||||
"SHAARIT_URL", "HUB_URL", "FLOWDECK_URL", "OAUTH_REDIRECT_URI",
|
||||
"AGENT_EVENEMENTS_URL")
|
||||
|
||||
|
||||
@@ -63,6 +63,24 @@ def test_shaarit_defaut_derivation_et_explicite(monkeypatch, avec_hote):
|
||||
assert draco_urls.shaarit_url() == "https://bm.example.net"
|
||||
|
||||
|
||||
def test_hub_defaut_derivation_et_explicite(monkeypatch, avec_hote):
|
||||
# Barre v0.3.0 (HUB-1) : le Hub suit le même mécanisme que les
|
||||
# autres sœurs — défaut officiel, dérivation -dev (agent connu
|
||||
# puis hôte de la requête), explicite prioritaire. Pas d'onglet :
|
||||
# sa base sert les liens du menu compte via urls.hub.
|
||||
assert draco_urls.hub_url() == "https://hub.dracodev.net"
|
||||
assert draco_urls.toutes()["hub"] == "https://hub.dracodev.net"
|
||||
monkeypatch.setenv(
|
||||
"AGENT_EVENEMENTS_URL",
|
||||
"https://agent-dev.dracodev.net/api/v1/evenements")
|
||||
assert draco_urls.hub_url() == "https://hub-dev.dracodev.net"
|
||||
monkeypatch.delenv("AGENT_EVENEMENTS_URL")
|
||||
avec_hote("flowdeck-dev.dracodev.net")
|
||||
assert draco_urls.hub_url() == "https://hub-dev.dracodev.net"
|
||||
monkeypatch.setenv("HUB_URL", "https://hub.example.net/")
|
||||
assert draco_urls.hub_url() == "https://hub.example.net"
|
||||
|
||||
|
||||
def test_flowdeck_url_derivée_oauth_redirect(monkeypatch):
|
||||
monkeypatch.setenv(
|
||||
"OAUTH_REDIRECT_URI", "https://flowdeck-dev.dracodev.net/auth/callback")
|
||||
|
||||
Reference in New Issue
Block a user