Skip to content

Commit

Permalink
Fix reversed order of values in unit tests and test removal of settin…
Browse files Browse the repository at this point in the history
…g u.path to rawPath (otherwise why do we need rawPath at all) seems like there were work arounds done here in bioth the unit tests AND the makeURL but logic needs to be examined
  • Loading branch information
PeaStew committed Jan 14, 2024
1 parent b3a5bcd commit 7f9747a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion consensus/bor/heimdall/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,6 @@ func makeURL(urlString, rawPath, rawQuery string) (*url.URL, error) {
return nil, err
}

u.Path = rawPath
u.Path = path.Join(u.Path, rawPath)
u.RawQuery = rawQuery

Expand Down
4 changes: 2 additions & 2 deletions consensus/bor/heimdall/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ func TestSpanURL(t *testing.T) {
const expected = "http://bor0/bor/span/1"

if url.String() != expected {
t.Fatalf("expected URL %q, got %q", url.String(), expected)
t.Fatalf("expected URL %q, got %q", expected, url.String())
}
}

Expand All @@ -414,6 +414,6 @@ func TestStateSyncURL(t *testing.T) {
const expected = "http://bor0/clerk/event-record/list?from-id=10&to-time=100&limit=50"

if url.String() != expected {
t.Fatalf("expected URL %q, got %q", url.String(), expected)
t.Fatalf("expected URL %q, got %q", expected, url.String())
}
}

0 comments on commit 7f9747a

Please sign in to comment.