mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 10:07:22 +00:00
Improve nuget/rubygems package registries (#34741)
1. Add some missing (optional) fields for nuget v2, and sort the fields to make it easier to maintain 2. Add missing "platform" for rubygems: `VERSION-PLATFORM` and `VERSION_PLATFORM` Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@ -24,14 +24,14 @@ func TestExtractPortablePdb(t *testing.T) {
|
||||
var buf bytes.Buffer
|
||||
archive := zip.NewWriter(&buf)
|
||||
w, _ := archive.Create(name)
|
||||
w.Write(content)
|
||||
archive.Close()
|
||||
_, _ = w.Write(content)
|
||||
_ = archive.Close()
|
||||
return buf.Bytes()
|
||||
}
|
||||
|
||||
t.Run("MissingPdbFiles", func(t *testing.T) {
|
||||
var buf bytes.Buffer
|
||||
zip.NewWriter(&buf).Close()
|
||||
_ = zip.NewWriter(&buf).Close()
|
||||
|
||||
pdbs, err := ExtractPortablePdb(bytes.NewReader(buf.Bytes()), int64(buf.Len()))
|
||||
assert.ErrorIs(t, err, ErrMissingPdbFiles)
|
||||
|
Reference in New Issue
Block a user