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

Method TestRemoveFilesWithPrefix

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

Source from the content-addressed store, hash-verified

1002}
1003
1004func (s *PublishedRepoRemoveSuite) TestRemoveFilesWithPrefix(c *C) {
1005 _ = s.repo1.RemoveFiles(s.provider, true, []string{"main"}, nil)
1006
1007 c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/anaconda"), Not(PathExists))
1008 c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/meduza"), Not(PathExists))
1009 c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/osminog"), Not(PathExists))
1010 c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/pool/main"), Not(PathExists))
1011 c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/pool/contrib"), Not(PathExists))
1012 c.Check(filepath.Join(s.publishedStorage.PublicPath(), "dists/anaconda"), PathExists)
1013 c.Check(filepath.Join(s.publishedStorage.PublicPath(), "pool/main"), PathExists)
1014 c.Check(filepath.Join(s.publishedStorage2.PublicPath(), "ppa/dists/osminog"), PathExists)
1015 c.Check(filepath.Join(s.publishedStorage2.PublicPath(), "ppa/pool/contrib"), PathExists)
1016}
1017
1018func (s *PublishedRepoRemoveSuite) TestRemoveFilesWithPrefixRoot(c *C) {
1019 _ = s.repo2.RemoveFiles(s.provider, true, []string{"main"}, nil)

Callers

nothing calls this directly

Calls 3

RemoveFilesMethod · 0.80
PublicPathMethod · 0.65
CheckMethod · 0.45

Tested by

no test coverage detected