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

Method PutFile

gcs/public_test.go:77–82  ·  view source on GitHub ↗
(c *C, path string, data []byte)

Source from the content-addressed store, hash-verified

75}
76
77func (s *PublishedStorageSuite) PutFile(c *C, path string, data []byte) {
78 w := s.storage.bucket.Object(path).NewWriter(context.TODO())
79 _, err := w.Write(data)
80 c.Assert(err, IsNil)
81 c.Assert(w.Close(), IsNil)
82}
83
84func (s *PublishedStorageSuite) TestString(c *C) {
85 c.Check(s.storage.String(), Equals, "GCS: test/")

Callers 8

TestFilelistMethod · 0.95
TestRemoveMethod · 0.95
TestRemoveDirsMethod · 0.95
TestRenameFileMethod · 0.95
TestSymLinkMethod · 0.95
TestHardLinkMethod · 0.95
TestFileExistsMethod · 0.95

Calls 2

WriteMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected