MCPcopy Index your code
hub / github.com/aptly-dev/aptly / TestUpdateLoadComplete

Method TestUpdateLoadComplete

deb/remote_test.go:849–868  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

847}
848
849func (s *RemoteRepoCollectionSuite) TestUpdateLoadComplete(c *C) {
850 repo, _ := NewRemoteRepo("yandex", "http://mirror.yandex.ru/debian/", "squeeze", []string{"main"}, []string{}, false, false, false, false)
851 c.Assert(s.collection.Update(repo), IsNil)
852
853 collection := NewRemoteRepoCollection(s.db)
854 r, err := collection.ByName("yandex")
855 c.Assert(err, IsNil)
856 c.Assert(r.packageRefs, IsNil)
857
858 repo.packageRefs = s.reflist
859 c.Assert(s.collection.Update(repo), IsNil)
860
861 collection = NewRemoteRepoCollection(s.db)
862 r, err = collection.ByName("yandex")
863 c.Assert(err, IsNil)
864 c.Assert(r.packageRefs, IsNil)
865 c.Assert(r.NumPackages(), Equals, 0)
866 c.Assert(s.collection.LoadComplete(r), IsNil)
867 c.Assert(r.NumPackages(), Equals, 3)
868}
869
870func (s *RemoteRepoCollectionSuite) TestForEachAndLen(c *C) {
871 repo, _ := NewRemoteRepo("yandex", "http://mirror.yandex.ru/debian/", "squeeze", []string{"main"}, []string{}, false, false, false, false)

Callers

nothing calls this directly

Calls 6

ByNameMethod · 0.95
NewRemoteRepoFunction · 0.85
NewRemoteRepoCollectionFunction · 0.85
UpdateMethod · 0.65
NumPackagesMethod · 0.45
LoadCompleteMethod · 0.45

Tested by

no test coverage detected