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

Method TestFilelistPlusWorkaround

s3/public_test.go:153–177  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

151}
152
153func (s *PublishedStorageSuite) TestFilelistPlusWorkaround(c *C) {
154 s.storage.plusWorkaround = true
155 s.prefixedStorage.plusWorkaround = true
156
157 paths := []string{"a", "b", "c", "testa", "test/a+1", "test/a 1", "lala/a+b", "lala/a b", "lala/c"}
158 for _, path := range paths {
159 s.PutFile(c, path, []byte("test"))
160 }
161
162 list, err := s.storage.Filelist("")
163 c.Check(err, IsNil)
164 c.Check(list, DeepEquals, []string{"a", "b", "c", "lala/a+b", "lala/c", "test/a+1", "testa"})
165
166 list, err = s.storage.Filelist("test")
167 c.Check(err, IsNil)
168 c.Check(list, DeepEquals, []string{"a+1"})
169
170 list, err = s.storage.Filelist("test2")
171 c.Check(err, IsNil)
172 c.Check(list, DeepEquals, []string{})
173
174 list, err = s.prefixedStorage.Filelist("")
175 c.Check(err, IsNil)
176 c.Check(list, DeepEquals, []string{"a+b", "c"})
177}
178
179func (s *PublishedStorageSuite) TestRemove(c *C) {
180 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