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

This commit is contained in:
Felix Lange 2019-08-15 10:36:36 +02:00 committed by GitHub
parent 260b177fe3
commit 26f538b0e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

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

View File

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