diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-04-22 08:50:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-22 08:50:32 -0400 |
commit | ad3da638ce17439a7adbf2aa7e1b4017d583f660 (patch) | |
tree | 4a975c6d37e9a3dad98b8e2f3119f58650589d5c /libpod/container_internal_linux_test.go | |
parent | 1bafde2d226067257d430c367ec2c53208d3eeeb (diff) | |
parent | e0f5bf279bd6aba1b018c2a2d7d31ee5a5f7b70b (diff) | |
download | podman-ad3da638ce17439a7adbf2aa7e1b4017d583f660.tar.gz podman-ad3da638ce17439a7adbf2aa7e1b4017d583f660.tar.bz2 podman-ad3da638ce17439a7adbf2aa7e1b4017d583f660.zip |
Merge pull request #13918 from Luap99/hosts
use etchosts package from c/common
Diffstat (limited to 'libpod/container_internal_linux_test.go')
-rw-r--r-- | libpod/container_internal_linux_test.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/libpod/container_internal_linux_test.go b/libpod/container_internal_linux_test.go index a7dd0fc31..2c1193445 100644 --- a/libpod/container_internal_linux_test.go +++ b/libpod/container_internal_linux_test.go @@ -8,7 +8,6 @@ import ( "os" "testing" - "github.com/containers/podman/v4/pkg/namespaces" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/stretchr/testify/assert" ) @@ -70,30 +69,3 @@ func TestGenerateUserGroupEntry(t *testing.T) { } assert.Equal(t, group, "567:x:567:567\n") } - -func TestAppendLocalhost(t *testing.T) { - { - c := Container{ - config: &ContainerConfig{ - ContainerNetworkConfig: ContainerNetworkConfig{ - NetMode: namespaces.NetworkMode("slirp4netns"), - }, - }, - } - - assert.Equal(t, "127.0.0.1\tlocalhost\n::1\tlocalhost\n", c.appendLocalhost("")) - assert.Equal(t, "127.0.0.1\tlocalhost", c.appendLocalhost("127.0.0.1\tlocalhost")) - } - { - c := Container{ - config: &ContainerConfig{ - ContainerNetworkConfig: ContainerNetworkConfig{ - NetMode: namespaces.NetworkMode("host"), - }, - }, - } - - assert.Equal(t, "", c.appendLocalhost("")) - assert.Equal(t, "127.0.0.1\tlocalhost", c.appendLocalhost("127.0.0.1\tlocalhost")) - } -} |