From b0f9a4a419bbc6e58742897dc9d22b6f895f4fdd Mon Sep 17 00:00:00 2001 From: Ryan Uber Date: Thu, 29 May 2014 22:07:59 -0700 Subject: [PATCH] Added tests for Release file in distribution directory --- deb/publish_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/deb/publish_test.go b/deb/publish_test.go index 0e49b20a..b2d15b4e 100644 --- a/deb/publish_test.go +++ b/deb/publish_test.go @@ -245,6 +245,16 @@ func (s *PublishedRepoSuite) TestPublish(c *C) { c.Assert(err, IsNil) c.Assert(st, IsNil) + drf, err := os.Open(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/squeeze/main/binary-i386/Release")) + c.Assert(err, IsNil) + + cfr = NewControlFileReader(drf) + st, err = cfr.ReadStanza() + c.Assert(err, IsNil) + + c.Check(st["Archive"], Equals, "squeeze") + c.Check(st["Architecture"], Equals, "i386") + _, err = os.Stat(filepath.Join(s.publishedStorage.PublicPath(), "ppa/pool/main/a/alien-arena/alien-arena-common_7.40-2_i386.deb")) c.Assert(err, IsNil) } @@ -261,6 +271,7 @@ func (s *PublishedRepoSuite) TestPublishLocalRepo(c *C) { c.Assert(err, IsNil) c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/maverick/Release"), PathExists) + c.Check(filepath.Join(s.publishedStorage.PublicPath(), "ppa/dists/maverick/main/binary-i386/Release"), PathExists) } func (s *PublishedRepoSuite) TestString(c *C) {