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

Method TestFileExists

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

Source from the content-addressed store, hash-verified

410}
411
412func (s *PublishedStorageSuite) TestFileExists(c *C) {
413 s.PutFile(c, "a/b", []byte("test"))
414
415 exists, err := s.storage.FileExists("a/b")
416 c.Check(err, IsNil)
417 c.Check(exists, Equals, true)
418
419 exists, _ = s.storage.FileExists("a/b.invalid")
420 // Comment out as there is an error in s3test implementation
421 // c.Check(err, IsNil)
422 c.Check(exists, Equals, false)
423}

Callers

nothing calls this directly

Calls 3

PutFileMethod · 0.95
FileExistsMethod · 0.65
CheckMethod · 0.45

Tested by

no test coverage detected