Skip to content

Commit

Permalink
fix(test): version must be 3.2.0 to support new hook section in config
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsquest committed May 22, 2024
1 parent f087f00 commit ddbfc2a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test_image_custom_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
'.'
Expand All @@ -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'
Expand All @@ -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'
Expand Down

0 comments on commit ddbfc2a

Please sign in to comment.