MCPcopy
hub / github.com/aptly-dev/aptly / TestByUUID

Method TestByUUID

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

Source from the content-addressed store, hash-verified

830}
831
832func (s *RemoteRepoCollectionSuite) TestByUUID(c *C) {
833 _, err := s.collection.ByUUID("some-uuid")
834 c.Assert(err, ErrorMatches, "*.not found")
835
836 repo, _ := NewRemoteRepo("yandex", "http://mirror.yandex.ru/debian/", "squeeze", []string{"main"}, []string{}, false, false, false, false)
837 c.Assert(s.collection.Add(repo), IsNil)
838
839 r, err := s.collection.ByUUID(repo.UUID)
840 c.Assert(err, IsNil)
841 c.Assert(r, Equals, repo)
842
843 collection := NewRemoteRepoCollection(s.db)
844 r, err = collection.ByUUID(repo.UUID)
845 c.Assert(err, IsNil)
846 c.Assert(r.String(), Equals, repo.String())
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)

Callers

nothing calls this directly

Calls 7

ByUUIDMethod · 0.95
StringMethod · 0.95
NewRemoteRepoFunction · 0.85
NewRemoteRepoCollectionFunction · 0.85
StringMethod · 0.65
ByUUIDMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected