github.com/containers/podman/v5@v5.1.0-rc1/test/compose/etc_hosts/tests.sh (about)

     1  # -*- bash -*-
     2  
     3  ctr_name="etc_hosts-test-1"
     4  
     5  podman exec "$ctr_name" sh -c 'grep "foobar" /etc/hosts'
     6  like "$output" "10\.123\.0\." "$testname : no entries are copied from the host"
     7  
     8  podman exec "$ctr_name" sh -c 'getent hosts foobar | awk "{print \$1}"'
     9  like "$output" "10\.123\.0\." "$testname : hostname is resolved to IP address of the alias"