Refactor maven package registry (#33049)

Close #33036
This commit is contained in:
wxiaoguang 2024-12-31 13:30:52 +08:00 committed by GitHub
parent 54bd220520
commit e5c576e92b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 143 additions and 60 deletions

View file

@ -183,6 +183,11 @@ func TestRouter(t *testing.T) {
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "*": "d1/d2/fn", "dir": "d1/d2", "file": "fn"},
handlerMark: "match-path",
})
testRoute(t, "GET /api/v1/repos/the-user/the-repo/branches/d1%2fd2/fn", resultStruct{
method: "GET",
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "*": "d1%2fd2/fn", "dir": "d1%2fd2", "file": "fn"},
handlerMark: "match-path",
})
testRoute(t, "GET /api/v1/repos/the-user/the-repo/branches/d1/d2/000", resultStruct{
method: "GET",
pathParams: map[string]string{"reponame": "the-repo", "username": "the-user", "*": "d1/d2/000"},