Skip to content

Commit b6d2a5d

Browse files
committed
GitLab can use both Path and RawPath
1 parent 639230a commit b6d2a5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/clusterctl/client/repository/repository_gitlab_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func Test_gitLabRepository_getFile(t *testing.T) {
154154

155155
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
156156
goproxytest.HTTPTestMethod(t, r, "GET")
157-
if r.URL.RawPath == "/api/v4/projects/group%2Fproject/packages/generic/my-package/v0.4.1/file.yaml" {
157+
if r.URL.EscapedPath() == "/api/v4/projects/group%2Fproject/packages/generic/my-package/v0.4.1/file.yaml" {
158158
w.Header().Set("Content-Type", "application/octet-stream")
159159
w.Header().Set("Content-Disposition", "attachment; filename=file.yaml")
160160
fmt.Fprint(w, "content")

0 commit comments

Comments
 (0)