mirror of
https://github.com/gomods/athens
synced 2026-02-03 12:10:32 +00:00
Add .info to upload payload (#141)
* Add .info to upload payload everywhere else as well + Upload payload includes Info + CLI uploads `version.info` as blob to storage + Getter and Saver methods updated for all storages implemented + Migration updated to include Info column + Tests no longer check RevInfo, now checking for Info same as Zip + Updated docs * newline in .fizz * change RevInfo.Info to []byte + change to []byte instead of io.Reader + adjust tests to check for info byte contents directly + add error check for minio client GetObject `pkg/storage/minio/getter.go`
This commit is contained in:
committed by
Michal Pristas
parent
8cce792e55
commit
9df207561d
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
func (d *MinioTests) TestGetSaveListRoundTrip() {
|
||||
r := d.Require()
|
||||
r.NoError(d.storage.Save(module, version, mod, zip))
|
||||
r.NoError(d.storage.Save(module, version, mod, zip, info))
|
||||
listedVersions, err := d.storage.List(module)
|
||||
r.NoError(err)
|
||||
r.Equal(1, len(listedVersions))
|
||||
@@ -15,12 +15,10 @@ func (d *MinioTests) TestGetSaveListRoundTrip() {
|
||||
gotten, err := d.storage.Get(module, version)
|
||||
r.NoError(err)
|
||||
defer gotten.Zip.Close()
|
||||
r.Equal(version, gotten.RevInfo.Version)
|
||||
r.Equal(version, gotten.RevInfo.Name)
|
||||
r.Equal(version, gotten.RevInfo.Short)
|
||||
// TODO: test the time
|
||||
r.Equal(gotten.Mod, mod)
|
||||
zipContent, err := ioutil.ReadAll(gotten.Zip)
|
||||
r.NoError(err)
|
||||
r.Equal(zipContent, zip)
|
||||
r.Equal(gotten.Info, info)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user