mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-27 10:43:38 +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:
@@ -7,6 +7,8 @@ import (
|
||||
"archive/tar"
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"crypto/sha512"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
@@ -52,6 +54,7 @@ func TestPackageVagrant(t *testing.T) {
|
||||
archive.Close()
|
||||
zw.Close()
|
||||
content := buf.Bytes()
|
||||
contentChecksum := sha512.Sum512(content)
|
||||
|
||||
root := fmt.Sprintf("/api/packages/%s/vagrant", user.Name)
|
||||
|
||||
@@ -164,6 +167,6 @@ func TestPackageVagrant(t *testing.T) {
|
||||
provider := version.Providers[0]
|
||||
assert.Equal(t, packageProvider, provider.Name)
|
||||
assert.Equal(t, "sha512", provider.ChecksumType)
|
||||
assert.Equal(t, "259bebd6160acad695016d22a45812e26f187aaf78e71a4c23ee3201528346293f991af3468a8c6c5d2a21d7d9e1bdc1bf79b87110b2fddfcc5a0d45963c7c30", provider.Checksum)
|
||||
assert.Equal(t, hex.EncodeToString(contentChecksum[:]), provider.Checksum)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user