mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-26 18:23:42 +00:00
chore: update Go to v1.27 (#39068)
Only made some necessary changes:
1. remove `GOEXPERIMENT`, only use jsonv2
1. `make fmt`
* `SigningKey` and `Signature` were affected due to some bugs in the
toolchain, so rewrote them
1. remove or fix fragile magic numbers and strings
* the outputs of image/gzip/zlib packages are different
1. update "nolint" comments for the changed lint behaviors
1. add `tls.MLKEM1024`
This commit is contained in:
@@ -424,13 +424,13 @@ func TestAPIUploadAssetRelease(t *testing.T) {
|
||||
resp := performUpload(t, assetURL, bufImageBytes, http.StatusCreated)
|
||||
attachment := DecodeJSON(t, resp, &api.Attachment{})
|
||||
assert.Equal(t, filename, attachment.Name)
|
||||
assert.EqualValues(t, 104, attachment.Size)
|
||||
assert.EqualValues(t, len(bufImageBytes), attachment.Size)
|
||||
})
|
||||
t.Run("UploadWithName", func(t *testing.T) {
|
||||
resp := performUpload(t, assetURL+"?name=test-asset", bufImageBytes, http.StatusCreated)
|
||||
attachment := DecodeJSON(t, resp, &api.Attachment{})
|
||||
assert.Equal(t, "test-asset", attachment.Name)
|
||||
assert.EqualValues(t, 104, attachment.Size)
|
||||
assert.EqualValues(t, len(bufImageBytes), attachment.Size)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -449,6 +449,6 @@ func TestAPIUploadAssetRelease(t *testing.T) {
|
||||
attachment := DecodeJSON(t, resp, &api.Attachment{})
|
||||
|
||||
assert.Equal(t, "stream.bin", attachment.Name)
|
||||
assert.EqualValues(t, 104, attachment.Size)
|
||||
assert.EqualValues(t, len(bufImageBytes), attachment.Size)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user