MCPcopy
hub / github.com/nats-io/nats.go / TestTLSConnectionStateNonTLS

Function TestTLSConnectionStateNonTLS

test/basic_test.go:115–126  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

113}
114
115func TestTLSConnectionStateNonTLS(t *testing.T) {
116 s := RunDefaultServer()
117 defer s.Shutdown()
118
119 nc := NewDefaultConnection(t)
120 defer nc.Close()
121
122 _, err := nc.TLSConnectionState()
123 if err != nats.ErrConnectionNotTLS {
124 t.Fatalf("Expected a not tls error, got: %v", err)
125 }
126}
127
128func TestConnectedServer(t *testing.T) {
129 s := RunDefaultServer()

Callers

nothing calls this directly

Calls 5

TLSConnectionStateMethod · 0.80
FatalfMethod · 0.80
RunDefaultServerFunction · 0.70
NewDefaultConnectionFunction · 0.70
CloseMethod · 0.45

Tested by

no test coverage detected