MCPcopy
hub / github.com/bradfitz/gomemcache / TestLocalhost

Function TestLocalhost

memcache/memcache_test.go:43–53  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

41const localhostTCPAddr = "localhost:11211"
42
43func TestLocalhost(t *testing.T) {
44 t.Parallel()
45 c, err := net.Dial("tcp", localhostTCPAddr)
46 if err != nil {
47 t.Skipf("skipping test; no server running at %s", localhostTCPAddr)
48 }
49 io.WriteString(c, "flush_all\r\n")
50 c.Close()
51
52 testWithClient(t, New(localhostTCPAddr))
53}
54
55// Run the memcached binary as a child process and connect to its unix socket.
56func TestUnixSocket(t *testing.T) {

Callers

nothing calls this directly

Calls 3

testWithClientFunction · 0.85
NewFunction · 0.85
CloseMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…