Skip to content

Commit ccc6c9b

Browse files
committed
test net.Dial error via empty address
1 parent 7b60f2b commit ccc6c9b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

base_conn_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,8 @@ func assertClose(t *testing.T, closer interface{ Close() error }) {
8080
err := closer.Close()
8181
assert.NoError(t, err)
8282
}
83+
84+
func TestBaseConnDialErr(t *testing.T) {
85+
_, err := BaseDial("")
86+
assert.EqualError(t, err, "dial tcp: missing address")
87+
}

0 commit comments

Comments
 (0)