mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-07 22:20:24 +00:00
Deleting packages & building file list from packages.
This commit is contained in:
Vendored
+20
@@ -182,6 +182,15 @@ func (s *PackageSuite) TestLinkFromPool(c *C) {
|
||||
c.Check(p.Files[0].Filename, Equals, "pool/non-free/a/alien-arena/alien-arena-common_7.40-2_i386.deb")
|
||||
}
|
||||
|
||||
func (s *PackageSuite) TestFilepathList(c *C) {
|
||||
packageRepo := NewRepository(c.MkDir())
|
||||
p := NewPackageFromControlFile(s.stanza)
|
||||
|
||||
list, err := p.FilepathList(packageRepo)
|
||||
c.Check(err, IsNil)
|
||||
c.Check(list, DeepEquals, []string{"1e/8c/alien-arena-common_7.40-2_i386.deb"})
|
||||
}
|
||||
|
||||
func (s *PackageSuite) TestDownloadList(c *C) {
|
||||
packageRepo := NewRepository(c.MkDir())
|
||||
p := NewPackageFromControlFile(s.stanza)
|
||||
@@ -247,3 +256,14 @@ func (s *PackageCollectionSuite) TestAllPackageRefs(c *C) {
|
||||
c.Check(refs.Len(), Equals, 1)
|
||||
c.Check(refs.Refs[0], DeepEquals, s.p.Key())
|
||||
}
|
||||
|
||||
func (s *PackageCollectionSuite) TestDeleteByKey(c *C) {
|
||||
err := s.collection.Update(s.p)
|
||||
c.Assert(err, IsNil)
|
||||
|
||||
err = s.collection.DeleteByKey(s.p.Key())
|
||||
c.Check(err, IsNil)
|
||||
|
||||
_, err = s.collection.ByKey(s.p.Key())
|
||||
c.Check(err, ErrorMatches, "key not found")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user