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

Method SetUpTest

api/published_file_missing_test.go:99–114  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

97}
98
99func (s *PublishedFileMissingSuite) SetUpTest(c *C) {
100 collectionFactory := s.context.NewCollectionFactory()
101
102 localRepoCollection := collectionFactory.LocalRepoCollection()
103 _ = localRepoCollection.ForEach(func(repo *deb.LocalRepo) error {
104 _ = localRepoCollection.Drop(repo)
105 return nil
106 })
107
108 publishedCollection := collectionFactory.PublishedRepoCollection()
109 _ = publishedCollection.ForEach(func(published *deb.PublishedRepo) error {
110 _ = publishedCollection.Remove(s.context, published.Storage, published.Prefix,
111 published.Distribution, collectionFactory, nil, true, true)
112 return nil
113 })
114}
115
116func (s *PublishedFileMissingSuite) TearDownTest(c *C) {
117 s.SetUpTest(c)

Callers 1

TearDownTestMethod · 0.95

Calls 6

LocalRepoCollectionMethod · 0.95
NewCollectionFactoryMethod · 0.80
DropMethod · 0.65
RemoveMethod · 0.65
ForEachMethod · 0.45

Tested by

no test coverage detected