diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-10-02 23:17:40 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-10-02 23:28:09 +0200 |
commit | 0f53c801b91919380a924b402d1ff822bb1dc6ea (patch) | |
tree | 428a6c2915344177a704d817796ffebdc9366536 /tests/guix-environment-container.sh | |
parent | 8e1907a72430aa989125b053573ef0897c480697 (diff) | |
download | guix-0f53c801b91919380a924b402d1ff822bb1dc6ea.tar.gz |
environment: Provide /etc/hosts in containers without '--network'.
Fixes <https://bugs.gnu.org/43762>. * guix/scripts/environment.scm (launch-environment/container): Create /etc/hosts when NETWORK? is false. * tests/guix-environment-container.sh: Add "localhost" resolution test.
Diffstat (limited to 'tests/guix-environment-container.sh')
-rw-r--r-- | tests/guix-environment-container.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/guix-environment-container.sh b/tests/guix-environment-container.sh index 040f32cce9..3674aa6026 100644 --- a/tests/guix-environment-container.sh +++ b/tests/guix-environment-container.sh @@ -44,6 +44,10 @@ else test $? = 42 fi +# Make sure "localhost" resolves. +guix environment --container --ad-hoc --bootstrap guile-bootstrap \ + -- guile -c '(exit (pair? (getaddrinfo "localhost" "80")))' + # Make sure '--preserve' is honored. result="`FOOBAR=42; export FOOBAR; guix environment -C --ad-hoc --bootstrap \ guile-bootstrap -E ^FOO -- guile -c '(display (getenv \"FOOBAR\"))'`" |