mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-04 05:10:40 +00:00
Updating reflist in local repo.
This commit is contained in:
Vendored
+5
@@ -51,6 +51,11 @@ func (repo *LocalRepo) RefList() *PackageRefList {
|
||||
return repo.packageRefs
|
||||
}
|
||||
|
||||
// UpdateRefList changes package list for local repo
|
||||
func (repo *LocalRepo) UpdateRefList(reflist *PackageRefList) {
|
||||
repo.packageRefs = reflist
|
||||
}
|
||||
|
||||
// Encode does msgpack encoding of LocalRepo
|
||||
func (repo *LocalRepo) Encode() []byte {
|
||||
var buf bytes.Buffer
|
||||
|
||||
Vendored
+5
@@ -46,6 +46,11 @@ func (s *LocalRepoSuite) TestRefList(c *C) {
|
||||
c.Check(s.repo.RefList(), Equals, s.reflist)
|
||||
}
|
||||
|
||||
func (s *LocalRepoSuite) TestUpdateRefList(c *C) {
|
||||
s.repo.UpdateRefList(nil)
|
||||
c.Check(s.repo.RefList(), IsNil)
|
||||
}
|
||||
|
||||
func (s *LocalRepoSuite) TestEncodeDecode(c *C) {
|
||||
repo := &LocalRepo{}
|
||||
err := repo.Decode(s.repo.Encode())
|
||||
|
||||
Reference in New Issue
Block a user