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

Method TestFilelist

files/public_test.go:157–174  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

155}
156
157func (s *PublishedStorageSuite) TestFilelist(c *C) {
158 err := s.storage.MkDir("ppa/pool/main/a/ab/")
159 c.Assert(err, IsNil)
160
161 err = s.storage.PutFile("ppa/pool/main/a/ab/a.deb", "/dev/null")
162 c.Assert(err, IsNil)
163
164 err = s.storage.PutFile("ppa/pool/main/a/ab/b.deb", "/dev/null")
165 c.Assert(err, IsNil)
166
167 list, err := s.storage.Filelist("ppa/pool/main/")
168 c.Check(err, IsNil)
169 c.Check(list, DeepEquals, []string{"a/ab/a.deb", "a/ab/b.deb"})
170
171 list, err = s.storage.Filelist("ppa/pool/doenstexist/")
172 c.Check(err, IsNil)
173 c.Check(list, DeepEquals, []string{})
174}
175
176func (s *PublishedStorageSuite) TestRenameFile(c *C) {
177 err := s.storage.MkDir("ppa/dists/squeeze/")

Callers

nothing calls this directly

Calls 4

MkDirMethod · 0.65
PutFileMethod · 0.65
FilelistMethod · 0.65
CheckMethod · 0.45

Tested by

no test coverage detected