Add options --with-packages to show list of packages in snapshot & mirror.

This commit is contained in:
Andrey Smirnov
2014-01-28 12:26:05 +04:00
parent 00bb27fcea
commit c538ca8cc6
12 changed files with 427 additions and 23 deletions
+5
View File
@@ -78,6 +78,11 @@ func (repo *RemoteRepo) NumPackages() int {
return repo.packageRefs.Len()
}
// RefList returns package list for repo
func (repo *RemoteRepo) RefList() *PackageRefList {
return repo.packageRefs
}
// ReleaseURL returns URL to Release file in repo root
// TODO: InRelease, Release.gz, Release.bz2 handling
func (repo *RemoteRepo) ReleaseURL() *url.URL {
+5
View File
@@ -72,6 +72,11 @@ func (s *RemoteRepoSuite) TestNumPackages(c *C) {
c.Check(s.repo.NumPackages(), Equals, 3)
}
func (s *RemoteRepoSuite) TestRefList(c *C) {
s.repo.packageRefs = s.reflist
c.Check(s.repo.RefList(), Equals, s.reflist)
}
func (s *RemoteRepoSuite) TestReleaseURL(c *C) {
c.Assert(s.repo.ReleaseURL().String(), Equals, "http://mirror.yandex.ru/debian/dists/squeeze/Release")
}