From ddbfc2abcd6c6b5c9757c44a69b23d033b11f99c Mon Sep 17 00:00:00 2001 From: Thomas Queste Date: Wed, 22 May 2024 12:23:45 +0200 Subject: [PATCH] fix(test): version must be 3.2.0 to support new hook section in config --- test_image_custom_build.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test_image_custom_build.py b/test_image_custom_build.py index 64d20d2..05d8fa9 100644 --- a/test_image_custom_build.py +++ b/test_image_custom_build.py @@ -2,11 +2,12 @@ import subprocess import testinfra + @pytest.fixture(scope='session') def host(): subprocess.check_call( ['docker', 'build', '-t', 'radicale-under-test', - '--build-arg', 'VERSION=3.0.0', + '--build-arg', 'VERSION=3.2.0', '--build-arg', 'BUILD_UID=6666', '--build-arg', 'BUILD_GID=7777', '.' @@ -18,17 +19,21 @@ def host(): # teardown subprocess.check_call(['docker', 'rm', '-f', docker_id]) + def test_process(host): process = host.process.get(comm='radicale') assert process.pid == 1 assert process.user == 'radicale' assert process.group == 'radicale' + def test_port(host): assert host.socket('tcp://0.0.0.0:5232').is_listening + def test_version(host): - assert host.check_output('/venv/bin/radicale --version') == '3.0.0' + assert host.check_output('/venv/bin/radicale --version') == '3.2.0' + def test_user(host): user = 'radicale' @@ -37,6 +42,7 @@ def test_user(host): assert host.user(user).shell == '/bin/false' assert 'radicale L ' in host.check_output('passwd --status radicale') + def test_data_folder_writable(host): folder = '/data' assert host.file(folder).user == 'radicale'