Test the adf-codec image tag's project name and twelve hex digits
CI / tests (pull_request) Has been cancelled
CI / tests (pull_request) Has been cancelled
This commit is contained in:
@@ -2,6 +2,7 @@ import contextlib
|
|||||||
import fcntl
|
import fcntl
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import pytest
|
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
|
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():
|
def test_the_container_command_line_is_exactly_this():
|
||||||
assert convert.docker_args("image:1", "to-adf") == [
|
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",
|
"docker", "run", "--rm", "-i", "--memory", "256m", "--memory-swap", "256m", "--network", "none", "--read-only", "image:1", "to-adf",
|
||||||
|
|||||||
Reference in New Issue
Block a user