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

Method TestLinkFromPoolMissingSource

gcs/public_test.go:379–384  ·  view source on GitHub ↗

TestLinkFromPoolMissingSource covers the source-pool open error path.

(c *C)

Source from the content-addressed store, hash-verified

377
378// TestLinkFromPoolMissingSource covers the source-pool open error path.
379func (s *PublishedStorageSuite) TestLinkFromPoolMissingSource(c *C) {
380 pool := files.NewPackagePool(c.MkDir(), false)
381
382 err := s.storage.LinkFromPool("", "pool/x", "y.deb", pool, "non-existent-pool-key", utils.ChecksumInfo{MD5: "33333333333333333333333333333333"}, false)
383 c.Check(err, ErrorMatches, ".*no such file or directory.*")
384}
385
386// TestPutFilePublicReadACL covers the applyACL public-read branch and the
387// ACL().Set call against the fake server.

Callers

nothing calls this directly

Calls 4

NewPackagePoolFunction · 0.92
MkDirMethod · 0.65
LinkFromPoolMethod · 0.65
CheckMethod · 0.45

Tested by

no test coverage detected