From a73a24c412d039ecbfa7f47e9ba9662d8479d383 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Tue, 31 Jan 2023 10:13:46 +0100 Subject: Client Test: Fix construct URL arguments --- client/client_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/client_test.go b/client/client_test.go index d8c3c4e..ec5086f 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -5,6 +5,7 @@ import ( "net/http" "os" "os/exec" + "net/url" "strconv" "strings" "testing" @@ -125,7 +126,12 @@ func testConnectOAuthParameter( t.Fatalf("No port with error: %v", portErr) } baseURL := fmt.Sprintf("http://127.0.0.1:%d/callback", port) - url, err := httpw.ConstructURL(baseURL, parameters) + p, err := url.Parse(baseURL) + if err != nil { + _ = state.CancelOAuth() + t.Fatalf("Failed to parse URL with error: %v", err) + } + url, err := httpw.ConstructURL(p, parameters) if err != nil { _ = state.CancelOAuth() t.Fatalf( -- cgit v1.2.3