p2p/enode, p2p/discv5: fix URL parsing test for go 1.12.8 (#19963)

pull/19967/head
Felix Lange 5 years ago committed by GitHub
parent 260b177fe3
commit 26f538b0e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      p2p/discv5/node_test.go
  2. 2
      p2p/enode/urlv4_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
}

@ -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
}

Loading…
Cancel
Save