diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-02-02 12:35:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-02 12:35:30 -0500 |
commit | 21a8ee904465b1aa54ce5fa6e3bbf93519ca0442 (patch) | |
tree | 21ad9581701bea877c3db583c31b86d6df70572d /test | |
parent | 2739b3ca85ad5d315acbbe17129d35223c8e2b55 (diff) | |
parent | a1bc8cb52cefd49e8cc54ae14d1864b8a1ec216e (diff) | |
download | podman-21a8ee904465b1aa54ce5fa6e3bbf93519ca0442.tar.gz podman-21a8ee904465b1aa54ce5fa6e3bbf93519ca0442.tar.bz2 podman-21a8ee904465b1aa54ce5fa6e3bbf93519ca0442.zip |
Merge pull request #13089 from rhatdan/resolv.conf
Only change network fields if they were actually changed by the user
Diffstat (limited to 'test')
-rw-r--r-- | test/system/500-networking.bats | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats index 5a721c965..e54b8d26a 100644 --- a/test/system/500-networking.bats +++ b/test/system/500-networking.bats @@ -589,4 +589,30 @@ 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", "test1.com"] + dns_servers = [ + "1.1.1.1", + "$searchIP", + "1.0.0.1", + "8.8.8.8", +] +EOF +export searchDNS="search example.com +search test1.com +search a.b" + 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" + CONTAINERS_CONF=$containersconf run_podman run --dns-search a.b --rm $IMAGE grep search /etc/resolv.conf + is "$output" "$searchDNS" "Searches should be on different lines" +} + # vim: filetype=sh |