diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2022-01-31 09:58:15 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2022-02-02 10:28:34 -0500 |
commit | 4ddc4e79d73eea56929ed522f7d7fce6285a41d4 (patch) | |
tree | d54ad0421f17a9b52def033ed4d3bcffee387ac5 /test | |
parent | dc0dc6a557dc9da9f89bd93baae3732e02b9ba20 (diff) | |
download | podman-4ddc4e79d73eea56929ed522f7d7fce6285a41d4.tar.gz podman-4ddc4e79d73eea56929ed522f7d7fce6285a41d4.tar.bz2 podman-4ddc4e79d73eea56929ed522f7d7fce6285a41d4.zip |
Only change network fields if they were actually changed by the user
Fixes: https://github.com/containers/podman/issues/13065
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/system/500-networking.bats | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats index 5a721c965..9f70c1c6c 100644 --- a/test/system/500-networking.bats +++ b/test/system/500-networking.bats @@ -589,4 +589,25 @@ load helpers run_podman network rm -t 0 -f $netname } +@test "podman run CONTAINERS_CONF dns options" { + skip_if_remote "CONTAINERS_CONF redirect does not work on remote" + # Test on the CLI and via containers.conf + containersconf=$PODMAN_TMPDIR/containers.conf + + searchIP="100.100.100.100" + cat >$containersconf <<EOF +[containers] + dns_searches = [ "example.com"] + dns_servers = [ + "1.1.1.1", + "$searchIP", + "1.0.0.1", + "8.8.8.8", +] +EOF + CONTAINERS_CONF=$containersconf run_podman run --rm $IMAGE grep "example.com" /etc/resolv.conf + CONTAINERS_CONF=$containersconf run_podman run --rm $IMAGE grep $searchIP /etc/resolv.conf + is "$output" "nameserver $searchIP" "Should only be one $searchIP not multiple" +} + # vim: filetype=sh |