MCPcopy Create free account
hub / github.com/datastax/cql-proxy / generateTestAddrs

Function generateTestAddrs

proxy/proxy_test.go:75–83  ·  view source on GitHub ↗
(host string)

Source from the content-addressed store, hash-verified

73}
74
75func generateTestAddrs(host string) (clusterPort int, clusterAddr, proxyAddr, httpAddr string) {
76 clusterPort = generateTestPort()
77 clusterAddr = net.JoinHostPort(host, strconv.Itoa(clusterPort))
78 proxyPort := generateTestPort()
79 proxyAddr = net.JoinHostPort(host, strconv.Itoa(proxyPort))
80 httpPort := generateTestPort()
81 httpAddr = net.JoinHostPort(host, strconv.Itoa(httpPort))
82 return clusterPort, clusterAddr, proxyAddr, httpAddr
83}
84
85func TestProxy_ListenAndServe(t *testing.T) {
86 ctx, cancel := context.WithCancel(context.Background())

Calls 1

generateTestPortFunction · 0.85

Tested by

no test coverage detected