MCPcopy Create free account
hub / github.com/assembla/cony / TestClient_connection

Function TestClient_connection

client_test.go:122–139  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

120func TestClient_channel(t *testing.T) {}
121
122func TestClient_connection(t *testing.T) {
123 c := NewClient()
124
125 if _, err := c.connection(); err != ErrNoConnection {
126 t.Error("error should be", ErrNoConnection)
127 }
128
129 c.conn.Store(&amqp.Connection{})
130
131 con, err := c.connection()
132 if con == nil {
133 t.Error("should return existing connection")
134 }
135
136 if err != nil {
137 t.Error("should be no errors")
138 }
139}
140
141func TestURL(t *testing.T) {
142 c := &Client{}

Callers

nothing calls this directly

Calls 2

connectionMethod · 0.95
NewClientFunction · 0.85

Tested by

no test coverage detected