test(infra): drop the Dockerfile-text assertions from the engine-queue test

Follow-up to a36f99e (the prior git-add aborted on the already-removed pathspec and
left this edit unstaged). Removes the change-detector image assertions and renames
the function to test_rustfs_engine_queue_policy; the least-privilege rustfs policy
assertions are what remains.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Marius Ciepluch
2026-10-12 16:03:14 +02:00
co-authored by Claude Opus 4.8
parent a36f99e15e
commit c3f610f9f4
+1 -10
View File
@@ -197,16 +197,7 @@ def test_engine_k8s_render_contract():
assert "AWS_SECRET_ACCESS_KEY" not in json.dumps(resources)
def test_engine_image_and_rustfs_policy():
dockerfile = (ROOT / "Dockerfile").read_text()
assert "COPY --chown=1000 benchmarks ./benchmarks" in dockerfile
# The image is built on the digest-pinned task base (which carries the semantic+s3 deps), so the package
# installs --no-deps and Joern (the semantic engine) is copied from the joern-build stage.
assert "ousast-task-base:${TASK_BASE_TAG}@${TASK_BASE_DIGEST}" in dockerfile
assert "/venv/bin/pip install --no-deps --no-cache-dir ." in dockerfile
assert "COPY --from=joern-build /opt/joern-cli /opt/joern-cli" in dockerfile
for name in ["engine_trace_worker.py", "engine_trace_parse.py", "engine_worker_service.py"]:
assert (ROOT / "benchmarks/learn" / name).stat().st_size > 0
def test_rustfs_engine_queue_policy():
doc = (ROOT / "docs/rustfs.md").read_text().split("## Scoped account for engine workers")[1]
policy = json.loads(doc.split("```json\n")[1].split("```")[0])
listing, objects = policy["Statement"]