mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-11-03 11:42:23 +01:00
test(runtime): use live local control transport credentials
This commit is contained in:
@@ -65,6 +65,9 @@ def test_auth_enabled_administration(monkeypatch, user, allowed):
|
|||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def control_app(tmp_path, monkeypatch):
|
def control_app(tmp_path, monkeypatch):
|
||||||
|
# Auth tests can reload middleware after collection. Authenticate the live
|
||||||
|
# transport token used by real producers, rather than a collection snapshot.
|
||||||
|
from core.middleware import INTERNAL_TOOL_HEADER, INTERNAL_TOOL_TOKEN, INTERNAL_TOOL_USER
|
||||||
monkeypatch.setenv('AUTH_ENABLED', 'true')
|
monkeypatch.setenv('AUTH_ENABLED', 'true')
|
||||||
manager = SimpleNamespace(is_configured=True, users={'alice': {}}, is_admin=lambda u: u == 'alice')
|
manager = SimpleNamespace(is_configured=True, users={'alice': {}}, is_admin=lambda u: u == 'alice')
|
||||||
import core.auth
|
import core.auth
|
||||||
|
|||||||
Reference in New Issue
Block a user