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

Method TestFileExists

gcs/public_test.go:221–231  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

219}
220
221func (s *PublishedStorageSuite) TestFileExists(c *C) {
222 s.PutFile(c, "a/b", []byte("test"))
223
224 exists, err := s.storage.FileExists("a/b")
225 c.Check(err, IsNil)
226 c.Check(exists, Equals, true)
227
228 exists, err = s.storage.FileExists("a/b.invalid")
229 c.Check(err, IsNil)
230 c.Check(exists, Equals, false)
231}
232
233func (s *PublishedStorageSuite) TestObjectPath(c *C) {
234 st := &PublishedStorage{prefix: "root"}

Callers

nothing calls this directly

Calls 3

PutFileMethod · 0.95
FileExistsMethod · 0.65
CheckMethod · 0.45

Tested by

no test coverage detected