STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_control_paths_confined Namespace Reference

Classes

class  _Opened

Functions

 opened (monkeypatch)
 client ()
 test_a_path_outside_configs_is_refused_unopened (client, opened, tmp_path, route)
 test_a_config_under_configs_is_read (client, opened)
 test_a_controller_config_outside_configs_is_refused (client, opened)
 test_the_stream_refuses_the_path_in_its_first_event (client, opened, tmp_path)
 test_a_failure_is_a_sentence_not_a_traceback (client, monkeypatch)

Variables

 reason
dict H = {"X-Auth-Email": "control-paths@berkeley.edu"}

Detailed Description

The controller routes read only configs/ (and the caller's own uploads), and fail in a sentence.

``config_path`` and ``controller_config_path`` were opened as given: POST
/api/control/simulate-from-config {config_path: "<anywhere>/design.json"} opened a file outside the
app, any user could run another user's upload (output/user_configs/<them>/x.yaml) through the
controller past design sharing, and the 500 carried a full traceback with server paths.

Function Documentation

◆ client()

test_control_paths_confined.client ( )

Definition at line 48 of file test_control_paths_confined.py.

◆ opened()

test_control_paths_confined.opened ( monkeypatch)
Record every path the route asks the loader to open; refuse to actually solve.

Definition at line 34 of file test_control_paths_confined.py.

◆ test_a_config_under_configs_is_read()

test_control_paths_confined.test_a_config_under_configs_is_read ( client,
opened )

Definition at line 63 of file test_control_paths_confined.py.

◆ test_a_controller_config_outside_configs_is_refused()

test_control_paths_confined.test_a_controller_config_outside_configs_is_refused ( client,
opened )

Definition at line 69 of file test_control_paths_confined.py.

◆ test_a_failure_is_a_sentence_not_a_traceback()

test_control_paths_confined.test_a_failure_is_a_sentence_not_a_traceback ( client,
monkeypatch )

Definition at line 81 of file test_control_paths_confined.py.

◆ test_a_path_outside_configs_is_refused_unopened()

test_control_paths_confined.test_a_path_outside_configs_is_refused_unopened ( client,
opened,
tmp_path,
route )

Definition at line 53 of file test_control_paths_confined.py.

◆ test_the_stream_refuses_the_path_in_its_first_event()

test_control_paths_confined.test_the_stream_refuses_the_path_in_its_first_event ( client,
opened,
tmp_path )

Definition at line 75 of file test_control_paths_confined.py.

Variable Documentation

◆ H

dict test_control_paths_confined.H = {"X-Auth-Email": "control-paths@berkeley.edu"}

Definition at line 26 of file test_control_paths_confined.py.

◆ reason

test_control_paths_confined.reason

Definition at line 18 of file test_control_paths_confined.py.