Add tests for UID/GID switching

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner 2023-07-26 08:31:29 +01:00
parent 62dd8d503c
commit f09b0d68bb
No known key found for this signature in database
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
import pytest
@pytest.mark.parametrize("test_args", ['-e "PIHOLE_UID=456"'])
def test_pihole_uid_env_var(docker):
func = docker.run('id -u pihole')
assert "456" in func.stdout
@pytest.mark.parametrize("test_args", ['-e "PIHOLE_GID=456"'])
def test_pihole_gid_env_var(docker):
func = docker.run('id -g pihole')
assert "456" in func.stdout