mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 11:49:28 +00:00
19 lines
958 B
Python
19 lines
958 B
Python
from pathlib import Path
|
|||
|
|
|
||
|
|
import yaml
|
||
|
|
|
||
|
|
|
||
|
|
def test_image_matches_runner_and_publishes_digest():
|
||
|
|
engine = Path("plane/Dockerfile.engine-task").read_text()
|
||
|
|
image = Path("plane/Dockerfile.search-task").read_text()
|
||
|
|
runner = "FROM ghcr.io/norandom/ax-task-runner:v0.3.1"
|
||
|
|
assert runner in engine and runner in image
|
||
|
|
for package in ("python3", "nodejs", "node-typescript", "php-cli", "sqlite3", "bubblewrap", "util-linux", "chromium"):
|
||
|
|
assert package in image
|
||
|
|
assert "17-jdk" in image and "--no-install-recommends" in image
|
||
|
|
assert "rm -rf /var/lib/apt/lists/" in image
|
||
|
|
workflow_text = Path(".github/workflows/engine-image.yml").read_text()
|
||
|
|
entries = yaml.safe_load(workflow_text)["jobs"]["image"]["strategy"]["matrix"]["include"]
|
||
|
|
assert {"package": "ousast-search-task", "dockerfile": "plane/Dockerfile.search-task"} in entries
|
||
|
|
assert "steps.build.outputs.digest" in workflow_text and "push: true" in workflow_text
|