MCPcopy
hub / github.com/moby/moby / TestSCTP6Proxy

Function TestSCTP6Proxy

cmd/docker-proxy/network_proxy_linux_test.go:497–514  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

495}
496
497func TestSCTP6Proxy(t *testing.T) {
498 backend := NewEchoServer(t, "sctp", "[::1]:0", EchoServerOptions{})
499 defer backend.Close()
500 backend.Run()
501 listener, frontendAddr := sctpListener(t, "sctp6", &sctp.SCTPAddr{IPAddrs: []net.IPAddr{{IP: net.ParseIP("::1")}}, Port: 0})
502 backendAddr := backend.LocalAddr().(*sctp.SCTPAddr)
503 config := ProxyConfig{
504 Proto: "sctp",
505 HostIP: frontendAddr.IPAddrs[0].IP,
506 HostPort: frontendAddr.Port,
507 ContainerIP: backendAddr.IPAddrs[0].IP,
508 ContainerPort: backendAddr.Port,
509 ListenSock: listener,
510 }
511 proxy, err := newProxy(config)
512 assert.NilError(t, err)
513 testProxyAt(t, "sctp", proxy, fmt.Sprintf("[%s]:%d", config.HostIP, config.HostPort), false)
514}

Callers

nothing calls this directly

Calls 7

CloseMethod · 0.95
RunMethod · 0.95
LocalAddrMethod · 0.95
NewEchoServerFunction · 0.85
sctpListenerFunction · 0.85
newProxyFunction · 0.85
testProxyAtFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…