Skip to content

Commit

Permalink
fix: E2E tests - RPC URL path
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite committed Dec 13, 2024
1 parent 03269f1 commit 3b40880
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions e2e/tests/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,14 @@ func (p *pocketdBin) runCurlCmd(rpcBaseURL, service, method, path, appAddr, data
}
rpcUrl.Path = rpcUrl.Path + path

// Ensure that the path also ends with a "/" if it only contains the version.
// This is required because the server responds with a 301 redirect for "/v1"
// and curl binaries on some platforms MAY NOT support re-sending POST data
// while following a redirect (`-L` flag).
if strings.HasSuffix(rpcUrl.Path, "/v1") {
rpcUrl.Path = rpcUrl.Path + "/"
}

base := []string{
"-v", // verbose output
"-sS", // silent with error
Expand Down

0 comments on commit 3b40880

Please sign in to comment.