MCPcopy
hub / github.com/grafana/dskit / TestNonIPsAreRejected

Function TestNonIPsAreRejected

kv/memberlist/tcp_transport_test.go:193–197  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

191}
192
193func TestNonIPsAreRejected(t *testing.T) {
194 cfg := TCPTransportConfig{BindAddrs: flagext.StringSlice{"localhost"}}
195 _, err := NewTCPTransport(cfg, nil, nil)
196 require.EqualError(t, err, `could not parse bind addr "localhost" as IP address`)
197}
198
199func TestTCPTransport_SentAndReceivedBytesMetrics(t *testing.T) {
200 setup := func(t *testing.T) (senderTransport, receiverTransport *TCPTransport, receiverAddr string, testData []byte) {

Callers

nothing calls this directly

Calls 1

NewTCPTransportFunction · 0.85

Tested by

no test coverage detected