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

Method GetFile

gcs/public_test.go:62–70  ·  view source on GitHub ↗
(c *C, path string)

Source from the content-addressed store, hash-verified

60}
61
62func (s *PublishedStorageSuite) GetFile(c *C, path string) []byte {
63 r, err := s.storage.bucket.Object(path).NewReader(context.TODO())
64 c.Assert(err, IsNil)
65 defer func() { _ = r.Close() }()
66
67 body, err := io.ReadAll(r)
68 c.Assert(err, IsNil)
69 return body
70}
71
72func (s *PublishedStorageSuite) AssertNoFile(c *C, path string) {
73 _, err := s.storage.bucket.Object(path).Attrs(context.TODO())

Callers 5

TestPutFileMethod · 0.95
TestRenameFileMethod · 0.95
TestSymLinkMethod · 0.95
TestLinkFromPoolMethod · 0.95

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected