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

Method TestFilelistPlus

azure/public_test.go:176–197  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

174}
175
176func (s *PublishedStorageSuite) TestFilelistPlus(c *C) {
177 paths := []string{"a", "b", "c", "testa", "test/a+1", "test/a 1", "lala/a+b", "lala/a b", "lala/c"}
178 for _, path := range paths {
179 s.PutFile(c, path, []byte("test"))
180 }
181
182 list, err := s.storage.Filelist("")
183 c.Check(err, IsNil)
184 c.Check(list, DeepEquals, []string{"a", "b", "c", "lala/a b", "lala/a+b", "lala/c", "test/a 1", "test/a+1", "testa"})
185
186 list, err = s.storage.Filelist("test")
187 c.Check(err, IsNil)
188 c.Check(list, DeepEquals, []string{"a 1", "a+1"})
189
190 list, err = s.storage.Filelist("test2")
191 c.Check(err, IsNil)
192 c.Check(list, DeepEquals, []string{})
193
194 list, err = s.prefixedStorage.Filelist("")
195 c.Check(err, IsNil)
196 c.Check(list, DeepEquals, []string{"a b", "a+b", "c"})
197}
198
199func (s *PublishedStorageSuite) TestRemove(c *C) {
200 s.PutFile(c, "a/b", []byte("test"))

Callers

nothing calls this directly

Calls 3

PutFileMethod · 0.95
FilelistMethod · 0.65
CheckMethod · 0.45

Tested by

no test coverage detected