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

Method TestByUUID

deb/local_test.go:119–134  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

117}
118
119func (s *LocalRepoCollectionSuite) TestByUUID(c *C) {
120 _, err := s.collection.ByUUID("some-uuid")
121 c.Assert(err, ErrorMatches, "*.not found")
122
123 repo := NewLocalRepo("local1", "Comment 1")
124 c.Assert(s.collection.Add(repo), IsNil)
125
126 r, err := s.collection.ByUUID(repo.UUID)
127 c.Assert(err, IsNil)
128 c.Assert(r, Equals, repo)
129
130 collection := NewLocalRepoCollection(s.db)
131 r, err = collection.ByUUID(repo.UUID)
132 c.Assert(err, IsNil)
133 c.Assert(r.String(), Equals, repo.String())
134}
135
136func (s *LocalRepoCollectionSuite) TestLoadCompleteNoRefKey(c *C) {
137 repo := NewLocalRepo("local1", "Comment 1")

Callers

nothing calls this directly

Calls 6

ByUUIDMethod · 0.95
StringMethod · 0.95
NewLocalRepoFunction · 0.85
NewLocalRepoCollectionFunction · 0.85
StringMethod · 0.65
AddMethod · 0.45

Tested by

no test coverage detected