From 664c2ab20af384c5b350aabf5f6307327d8de09e Mon Sep 17 00:00:00 2001 From: Nguyen Kien Trung Date: Tue, 27 Aug 2019 15:17:59 -0400 Subject: [PATCH] p2p/enode, p2p/discv5: fix URL parsing test for go 1.11.13 (#810) --- .travis.yml | 2 +- p2p/discv5/node_test.go | 2 +- p2p/enode/urlv4_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b083106d8..6a651295a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ language: go go_import_path: github.com/ethereum/go-ethereum -go: 1.11.12 +go: 1.11.x sudo: true branches: only: 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 f6b9278c1..b546c4cdf 100644 --- a/p2p/enode/urlv4_test.go +++ b/p2p/enode/urlv4_test.go @@ -139,7 +139,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 }