From e0f5bf279bd6aba1b018c2a2d7d31ee5a5f7b70b Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 21 Apr 2022 19:19:09 +0200 Subject: test/system: add containers.conf test for new /etc/hosts options Signed-off-by: Paul Holzinger --- test/system/500-networking.bats | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'test') diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats index 274af7ec5..880bf63ac 100644 --- a/test/system/500-networking.bats +++ b/test/system/500-networking.bats @@ -677,4 +677,48 @@ EOF done } +@test "podman run CONTAINERS_CONF /etc/hosts options" { + skip_if_remote "CONTAINERS_CONF redirect does not work on remote" + + containersconf=$PODMAN_TMPDIR/containers.conf + basehost=$PODMAN_TMPDIR/host + + ip1="$(random_rfc1918_subnet).$((RANDOM % 256))" + name1=host1$(random_string) + ip2="$(random_rfc1918_subnet).$((RANDOM % 256))" + name2=host2$(random_string) + + cat >$basehost <$containersconf <