diff --git a/bin/adf_codec/test_adf_codec.py b/bin/adf_codec/test_adf_codec.py index 1fe9fffe..54e91747 100644 --- a/bin/adf_codec/test_adf_codec.py +++ b/bin/adf_codec/test_adf_codec.py @@ -2,6 +2,7 @@ import contextlib import fcntl import json import os +import re import subprocess import pytest @@ -143,6 +144,12 @@ def test_the_image_tag_changes_with_the_shim_files(tmp_path): assert convert.image_tag(tmp_path) != before +def test_the_image_tag_is_the_project_name_and_twelve_hex_digits_of_the_shim_files(tmp_path): + for name in convert.SHIM_FILES: + (tmp_path / name).write_text("a") + assert re.fullmatch(r"dev-factory-adf-codec:[0-9a-f]{12}", convert.image_tag(tmp_path)) + + def test_the_container_command_line_is_exactly_this(): assert convert.docker_args("image:1", "to-adf") == [ "docker", "run", "--rm", "-i", "--memory", "256m", "--memory-swap", "256m", "--network", "none", "--read-only", "image:1", "to-adf",