mirror of
https://github.com/go-i2p/goSam.git
synced 2025-06-08 09:16:28 -04:00
Fix a bunch of errors that could potentially happen because of changes I made to the Dialer
This commit is contained in:
@ -10,8 +10,10 @@ import (
|
||||
func TestClientLookupInvalid(t *testing.T) {
|
||||
var err error
|
||||
|
||||
setup(t)
|
||||
defer teardown(t)
|
||||
client, err := NewClientFromOptions(SetDebug(false))
|
||||
if err != nil {
|
||||
t.Fatalf("NewDefaultClient() Error: %q\n", err)
|
||||
}
|
||||
|
||||
addr, err := client.Lookup(`!(@#)`)
|
||||
if addr != "" || err == nil {
|
||||
@ -25,6 +27,9 @@ func TestClientLookupInvalid(t *testing.T) {
|
||||
if repErr.Result != ResultKeyNotFound {
|
||||
t.Errorf("client.Lookup() should throw an ResultKeyNotFound error.\nGot:%+v%s%s\n", repErr, "!=", ResultKeyNotFound)
|
||||
}
|
||||
if err := client.Close(); err != nil {
|
||||
t.Fatalf("client.Close() Error: %q\n", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestClientLookupValid(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user