|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Functions | |
| Request | _request (str|None email) |
| _run (coro) | |
| test_distinct_users_get_distinct_sessions () | |
| test_same_user_reuses_one_session () | |
| test_dev_fallback_is_a_single_local_session () | |
| test_ttl_eviction_recreates_a_fresh_session (monkeypatch) | |
| test_job_cap_is_three () | |
| test_one_users_config_edit_does_not_touch_another () | |
| test_optimizer_status_and_results_are_per_user () | |
| test_stop_only_affects_the_callers_run () | |
| test_controller_is_per_user () | |
Per-user live-state isolation for the Engine Design backend. Two users connected at once must not share the live config, the optimizer job state, or the controller. Identity is the ``X-Auth-Email`` header (Caddy in prod, absent in dev -> ``local``). These tests drive the real dependency and endpoint coroutines directly -- no HTTP client needed -- so they exercise exactly what Caddy's forwarded header feeds into the app. See backend/session.py for the mechanism.
|
protected |
A minimal ASGI request carrying (or omitting) the auth header.
Definition at line 29 of file test_session_isolation.py.
Referenced by test_controller_is_per_user(), test_dev_fallback_is_a_single_local_session(), test_distinct_users_get_distinct_sessions(), test_one_users_config_edit_does_not_touch_another(), test_optimizer_status_and_results_are_per_user(), test_same_user_reuses_one_session(), and test_stop_only_affects_the_callers_run().
|
protected |
Definition at line 43 of file test_session_isolation.py.
Referenced by test_controller_is_per_user(), test_one_users_config_edit_does_not_touch_another(), test_optimizer_status_and_results_are_per_user(), and test_stop_only_affects_the_callers_run().
| test_session_isolation.test_controller_is_per_user | ( | ) |
Definition at line 152 of file test_session_isolation.py.
References _request(), and _run().
| test_session_isolation.test_dev_fallback_is_a_single_local_session | ( | ) |
No Caddy in dev -> no header -> everyone is `local`, one shared session, with the default config loaded (the old single-user behaviour).
Definition at line 63 of file test_session_isolation.py.
References _request().
| test_session_isolation.test_distinct_users_get_distinct_sessions | ( | ) |
Definition at line 50 of file test_session_isolation.py.
References _request().
| test_session_isolation.test_job_cap_is_three | ( | ) |
Definition at line 83 of file test_session_isolation.py.
| test_session_isolation.test_one_users_config_edit_does_not_touch_another | ( | ) |
Definition at line 91 of file test_session_isolation.py.
References _request(), and _run().
| test_session_isolation.test_optimizer_status_and_results_are_per_user | ( | ) |
Definition at line 113 of file test_session_isolation.py.
References _request(), and _run().
| test_session_isolation.test_same_user_reuses_one_session | ( | ) |
Definition at line 57 of file test_session_isolation.py.
References _request().
| test_session_isolation.test_stop_only_affects_the_callers_run | ( | ) |
Definition at line 131 of file test_session_isolation.py.
References _request(), and _run().
| test_session_isolation.test_ttl_eviction_recreates_a_fresh_session | ( | monkeypatch | ) |
Definition at line 73 of file test_session_isolation.py.