1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/integration-cli/docker_cli_links_unix_test.go
John Howard 4fccf8adfa Moved unix links tests to non-platform
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-01 09:10:24 -07:00

27 lines
582 B
Go

// +build !windows
package main
import (
"io/ioutil"
"os"
"github.com/go-check/check"
)
func (s *DockerSuite) TestLinksEtcHostsContentMatch(c *check.C) {
// In a _unix file as using Unix specific files, and must be on the
// same host as the daemon.
testRequires(c, SameHostDaemon)
out, _ := dockerCmd(c, "run", "--net=host", "busybox", "cat", "/etc/hosts")
hosts, err := ioutil.ReadFile("/etc/hosts")
if os.IsNotExist(err) {
c.Skip("/etc/hosts does not exist, skip this test")
}
if out != string(hosts) {
c.Errorf("container: %s\n\nhost:%s", out, hosts)
}
}