aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2019-08-15 16:36:36 +0800
committerGitHub <noreply@github.com>2019-08-15 16:36:36 +0800
commit26f538b0e5a78bbe6ffc22bc5c25d42001d1bc9d (patch)
tree1fe7e0325fec942a6628e5ff8b4c7697a05afe78
parent260b177fe3f0ec897a4a4d71f2c2247e50b9fbd3 (diff)
downloadgo-tangerine-26f538b0e5a78bbe6ffc22bc5c25d42001d1bc9d.tar
go-tangerine-26f538b0e5a78bbe6ffc22bc5c25d42001d1bc9d.tar.gz
go-tangerine-26f538b0e5a78bbe6ffc22bc5c25d42001d1bc9d.tar.bz2
go-tangerine-26f538b0e5a78bbe6ffc22bc5c25d42001d1bc9d.tar.lz
go-tangerine-26f538b0e5a78bbe6ffc22bc5c25d42001d1bc9d.tar.xz
go-tangerine-26f538b0e5a78bbe6ffc22bc5c25d42001d1bc9d.tar.zst
go-tangerine-26f538b0e5a78bbe6ffc22bc5c25d42001d1bc9d.zip
p2p/enode, p2p/discv5: fix URL parsing test for go 1.12.8 (#19963)
-rw-r--r--p2p/discv5/node_test.go2
-rw-r--r--p2p/enode/urlv4_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/p2p/discv5/node_test.go b/p2p/discv5/node_test.go
index ce4ad9e4d..c231345db 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 69ed11102..12399d291 100644
--- a/p2p/enode/urlv4_test.go
+++ b/p2p/enode/urlv4_test.go
@@ -162,7 +162,7 @@ func TestParseNode(t *testing.T) {
if err == nil {
t.Errorf("test %q:\n got nil error, expected %#q", test.input, 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.input, err.Error(), test.wantError)
continue
}