test(runtime): use live local control transport credentials

This commit is contained in:
Alexandre Teixeira
2026-10-03 00:10:24 +01:00
parent 721b5ca831
commit 55d5b1d10a
+3
View File
@@ -65,6 +65,9 @@ def test_auth_enabled_administration(monkeypatch, user, allowed):
@pytest.fixture
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')
manager = SimpleNamespace(is_configured=True, users={'alice': {}}, is_admin=lambda u: u == 'alice')
import core.auth