Skip to content

Commit 26f538b

Browse files
authored
p2p/enode, p2p/discv5: fix URL parsing test for go 1.12.8 (#19963)
1 parent 260b177 commit 26f538b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎p2p/discv5/node_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func TestParseNode(t *testing.T) {
152152
if err == nil {
153153
t.Errorf("test %q:\n got nil error, expected %#q", test.rawurl, test.wantError)
154154
continue
155-
} else if err.Error() != test.wantError {
155+
} else if !strings.Contains(err.Error(), test.wantError) {
156156
t.Errorf("test %q:\n got error %#q, expected %#q", test.rawurl, err.Error(), test.wantError)
157157
continue
158158
}

‎p2p/enode/urlv4_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func TestParseNode(t *testing.T) {
162162
if err == nil {
163163
t.Errorf("test %q:\n got nil error, expected %#q", test.input, test.wantError)
164164
continue
165-
} else if err.Error() != test.wantError {
165+
} else if !strings.Contains(err.Error(), test.wantError) {
166166
t.Errorf("test %q:\n got error %#q, expected %#q", test.input, err.Error(), test.wantError)
167167
continue
168168
}

0 commit comments

Comments
 (0)