Skip to content

Commit a45858f

Browse files
committed
fix(test): send the complete worker policy from the session-scope fixture
PR 2257 still named only the two discovery keys in the worker-scope script. The worker now fail-closes unless every known policy key is present, so the fixture must stand in for the supervisor with cbm_test_index_worker_policy_json. Signed-off-by: 刘冲 <mail@liuchong.dev>
1 parent de16152 commit a45858f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎tests/test_worker_session_scope.sh‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ run_worker() {
7373
# A worker never reads the resource policy from config or environment: the
7474
# supervisor resolves it and sends it inside the request, and a request
7575
# without one is refused ("missing or incomplete trusted worker policy").
76-
# This script plays the supervisor, so it sends what the supervisor sends --
77-
# both limits off, the default.
78-
policy='"_cbm_index_policy":{"index_max_files":"off","index_max_source_mb":"off"}'
76+
# This script plays the supervisor, so it sends the same complete object
77+
# cbm_test_index_worker_policy_json produces -- every known key, all off.
78+
policy="$(cbm_test_index_worker_policy_json)"
7979

8080
response="${tmpdir}/scoped.response"
8181
if ! run_worker "{\"repo_path\":\"${repo}\",\"mode\":\"fast\",${policy}}" "${response}" \

0 commit comments

Comments
 (0)