mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-16 12:08:04 +00:00
Final round of updates, everything except mirror download should be ready
This commit is contained in:
@@ -189,6 +189,24 @@ func (s *PackagePoolSuite) TestLink(c *C) {
|
||||
c.Check(info.Sys().(*syscall.Stat_t).Nlink > 2, Equals, true)
|
||||
}
|
||||
|
||||
func (s *PackagePoolSuite) TestSymlink(c *C) {
|
||||
path, err := s.pool.Import(s.debFile, filepath.Base(s.debFile), &s.checksum, false)
|
||||
c.Check(err, IsNil)
|
||||
|
||||
tmpDir := c.MkDir()
|
||||
dstPath := filepath.Join(tmpDir, filepath.Base(s.debFile))
|
||||
c.Check(s.pool.Symlink(path, dstPath), IsNil)
|
||||
|
||||
info, err := os.Stat(dstPath)
|
||||
c.Assert(err, IsNil)
|
||||
c.Check(info.Size(), Equals, int64(2738))
|
||||
c.Check(info.Sys().(*syscall.Stat_t).Nlink > 2, Equals, true)
|
||||
|
||||
info, err = os.Lstat(dstPath)
|
||||
c.Assert(err, IsNil)
|
||||
c.Check(info.Sys().(*syscall.Stat_t).Mode&syscall.S_IFMT, Equals, uint16(syscall.S_IFLNK))
|
||||
}
|
||||
|
||||
func (s *PackagePoolSuite) TestGenerateRandomPath(c *C) {
|
||||
path, err := s.pool.GenerateTempPath("a.deb")
|
||||
c.Check(err, IsNil)
|
||||
|
||||
Reference in New Issue
Block a user