mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-08 20:37:43 +00:00
fix: misc fixes in pub/gpg/tests (#38809)
- The pub registry reported the oldest version as `latest`, because the descriptor slice is sorted ascending but the first element was used. - Verifying a GPG or SSH key flashed success and redirected after already writing an error response, so a failure was reported as a success with an empty key id. - Test packages sharing redis could tear down each other's server. `PrepareTestRedis` started its own on the well-known port, so a package running in parallel borrowed it and lost it when the owner's cleanup fired. It now listens on a socket of its own.
This commit is contained in:
@@ -108,7 +108,7 @@ func EnumeratePackageVersions(ctx *context.Context) {
|
||||
|
||||
jsonResponse(ctx, http.StatusOK, &packageVersions{
|
||||
Name: pds[0].Package.Name,
|
||||
Latest: packageDescriptorToMetadata(baseURL, pds[0]),
|
||||
Latest: versions[len(versions)-1], // versions mirrors pds, sorted ascending
|
||||
Versions: versions,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user