MCPcopy Create free account
hub / github.com/aptly-dev/aptly / TestUpdateLoadComplete

Method TestUpdateLoadComplete

deb/publish_test.go:749–768  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

747}
748
749func (s *PublishedRepoCollectionSuite) TestUpdateLoadComplete(c *C) {
750 c.Assert(s.collection.Update(s.repo1), IsNil)
751 c.Assert(s.collection.Update(s.repo4), IsNil)
752
753 collection := NewPublishedRepoCollection(s.db)
754 r, err := collection.ByStoragePrefixDistribution("", "ppa", "anaconda")
755 c.Assert(err, IsNil)
756 c.Assert(r.sourceItems["main"].snapshot, IsNil)
757 c.Assert(s.collection.LoadComplete(r, s.factory), IsNil)
758 c.Assert(r.Sources["main"], Equals, s.repo1.sourceItems["main"].snapshot.UUID)
759 c.Assert(r.RefList("main").Len(), Equals, 2)
760
761 r, err = collection.ByStoragePrefixDistribution("", "ppa", "precise")
762 c.Assert(err, IsNil)
763 c.Assert(r.sourceItems["main"].localRepo, IsNil)
764 c.Assert(s.collection.LoadComplete(r, s.factory), IsNil)
765 c.Assert(r.sourceItems["main"].localRepo.UUID, Equals, s.repo4.sourceItems["main"].localRepo.UUID)
766 c.Assert(r.sourceItems["main"].packageRefs.Len(), Equals, 0)
767 c.Assert(r.RefList("main").Len(), Equals, 0)
768}
769
770func (s *PublishedRepoCollectionSuite) TestLoadPre0_6(c *C) {
771 type oldPublishedRepo struct {

Callers

nothing calls this directly

Calls 6

UpdateMethod · 0.65
LoadCompleteMethod · 0.45
LenMethod · 0.45
RefListMethod · 0.45

Tested by

no test coverage detected