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

Method TestFindByRemoteRepoSource

deb/snapshot_test.go:275–285  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

273}
274
275func (s *SnapshotCollectionSuite) TestFindByRemoteRepoSource(c *C) {
276 c.Assert(s.collection.Add(s.snapshot1), IsNil)
277 c.Assert(s.collection.Add(s.snapshot2), IsNil)
278
279 c.Check(s.collection.ByRemoteRepoSource(s.repo1), DeepEquals, []*Snapshot{s.snapshot1})
280 c.Check(s.collection.ByRemoteRepoSource(s.repo2), DeepEquals, []*Snapshot{s.snapshot2})
281
282 repo3, _ := NewRemoteRepo("other", "http://mirror.yandex.ru/debian/", "lenny", []string{"main"}, []string{}, false, false, false, false)
283
284 c.Check(s.collection.ByRemoteRepoSource(repo3), DeepEquals, []*Snapshot(nil))
285}
286
287func (s *SnapshotCollectionSuite) TestFindByLocalRepoSource(c *C) {
288 c.Assert(s.collection.Add(s.snapshot1), IsNil)

Callers

nothing calls this directly

Calls 4

NewRemoteRepoFunction · 0.85
ByRemoteRepoSourceMethod · 0.80
AddMethod · 0.45
CheckMethod · 0.45

Tested by

no test coverage detected