diff options
author | Felix Lange <fjl@twurst.com> | 2019-08-15 16:36:36 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-10-03 14:52:28 +0800 |
commit | 6675923a8ed9f6abdaad6505e402b0b9c59fd529 (patch) | |
tree | 395660f31f02c2fa1b43aa03bb0208471949e332 /p2p | |
parent | 05a249d001cb80676e4ad5524d585b45ef8bf507 (diff) | |
download | go-tangerine-6675923a8ed9f6abdaad6505e402b0b9c59fd529.tar go-tangerine-6675923a8ed9f6abdaad6505e402b0b9c59fd529.tar.gz go-tangerine-6675923a8ed9f6abdaad6505e402b0b9c59fd529.tar.bz2 go-tangerine-6675923a8ed9f6abdaad6505e402b0b9c59fd529.tar.lz go-tangerine-6675923a8ed9f6abdaad6505e402b0b9c59fd529.tar.xz go-tangerine-6675923a8ed9f6abdaad6505e402b0b9c59fd529.tar.zst go-tangerine-6675923a8ed9f6abdaad6505e402b0b9c59fd529.zip |
BACKPORT: p2p/enode, p2p/discv5: fix URL parsing test for go 1.12.8 (#19963)
Diffstat (limited to 'p2p')
-rw-r--r-- | p2p/discv5/node_test.go | 2 | ||||
-rw-r--r-- | p2p/enode/urlv4_test.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/p2p/discv5/node_test.go b/p2p/discv5/node_test.go index c091ac019..e361c3d58 100644 --- a/p2p/discv5/node_test.go +++ b/p2p/discv5/node_test.go @@ -152,7 +152,7 @@ func TestParseNode(t *testing.T) { if err == nil { t.Errorf("test %q:\n got nil error, expected %#q", test.rawurl, test.wantError) continue - } else if err.Error() != test.wantError { + } else if !strings.Contains(err.Error(), test.wantError) { t.Errorf("test %q:\n got error %#q, expected %#q", test.rawurl, err.Error(), test.wantError) continue } diff --git a/p2p/enode/urlv4_test.go b/p2p/enode/urlv4_test.go index 3680ab6b7..fc65db0fc 100644 --- a/p2p/enode/urlv4_test.go +++ b/p2p/enode/urlv4_test.go @@ -135,7 +135,7 @@ func TestParseNode(t *testing.T) { if err == nil { t.Errorf("test %q:\n got nil error, expected %#q", test.rawurl, test.wantError) continue - } else if err.Error() != test.wantError { + } else if !strings.Contains(err.Error(), test.wantError) { t.Errorf("test %q:\n got error %#q, expected %#q", test.rawurl, err.Error(), test.wantError) continue } |