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

Method TestStat

files/package_pool_test.go:322–332  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

320}
321
322func (s *PackagePoolSuite) TestStat(c *C) {
323 path, err := s.pool.Import(s.debFile, filepath.Base(s.debFile), &s.checksum, false, s.cs)
324 c.Check(err, IsNil)
325
326 info, err := s.pool.Stat(path)
327 c.Assert(err, IsNil)
328 c.Check(info.Size(), Equals, int64(2738))
329
330 _, err = s.pool.Stat("do/es/ntexist")
331 c.Assert(os.IsNotExist(err), Equals, true)
332}
333
334func (s *PackagePoolSuite) TestOpen(c *C) {
335 path, err := s.pool.Import(s.debFile, filepath.Base(s.debFile), &s.checksum, false, s.cs)

Callers

nothing calls this directly

Calls 4

ImportMethod · 0.65
StatMethod · 0.65
SizeMethod · 0.65
CheckMethod · 0.45

Tested by

no test coverage detected