From d4307ad03c2268fa8924fa0c9bc0d3cef769c3a2 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Fri, 7 Feb 2014 11:37:01 +0400 Subject: [PATCH] Test on publishing with --skip-signing. --- system/t06_publish/PublishSnapshot13Test_gold | 8 +++++ .../t06_publish/PublishSnapshot13Test_release | 9 ++++++ system/t06_publish/snapshot.py | 30 +++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 system/t06_publish/PublishSnapshot13Test_gold create mode 100644 system/t06_publish/PublishSnapshot13Test_release diff --git a/system/t06_publish/PublishSnapshot13Test_gold b/system/t06_publish/PublishSnapshot13Test_gold new file mode 100644 index 00000000..0cd0786d --- /dev/null +++ b/system/t06_publish/PublishSnapshot13Test_gold @@ -0,0 +1,8 @@ + +Snapshot snap13 has been successfully published. +Please setup your webserver to serve directory '${HOME}/.aptly/public' with autoindexing. +Now you can add following line to apt sources: + deb http://your-server/ maverick main +Don't forget to add your GPG key to apt with apt-key. + +You can also use `aptly serve` to publish your repositories over HTTP quickly. diff --git a/system/t06_publish/PublishSnapshot13Test_release b/system/t06_publish/PublishSnapshot13Test_release new file mode 100644 index 00000000..9444c59b --- /dev/null +++ b/system/t06_publish/PublishSnapshot13Test_release @@ -0,0 +1,9 @@ +Origin: . maverick +Label: . maverick +Codename: maverick +Architectures: amd64 i386 +Components: main +Description: Generated by aptly +MD5Sum: +SHA1: +SHA256: diff --git a/system/t06_publish/snapshot.py b/system/t06_publish/snapshot.py index 2b94e610..9364f3d5 100644 --- a/system/t06_publish/snapshot.py +++ b/system/t06_publish/snapshot.py @@ -284,3 +284,33 @@ class PublishSnapshot12Test(BaseTest): fixtureDB = True runCmd = "aptly publish snapshot snap12" expectedCode = 1 + + +class PublishSnapshot13Test(BaseTest): + """ + publish snapshot: -skip-signing + """ + fixtureDB = True + fixturePool = True + fixtureCmds = [ + "aptly snapshot create snap13 from mirror gnuplot-maverick", + ] + runCmd = "aptly publish snapshot -skip-signing snap13" + gold_processor = BaseTest.expand_environ + + def check(self): + super(PublishSnapshot13Test, self).check() + + self.check_not_exists('public/dists/maverick/InRelease') + self.check_exists('public/dists/maverick/Release') + self.check_not_exists('public/dists/maverick/Release.gpg') + + self.check_exists('public/dists/maverick/main/binary-i386/Packages') + self.check_exists('public/dists/maverick/main/binary-i386/Packages.gz') + self.check_exists('public/dists/maverick/main/binary-i386/Packages.bz2') + self.check_exists('public/dists/maverick/main/binary-amd64/Packages') + self.check_exists('public/dists/maverick/main/binary-amd64/Packages.gz') + self.check_exists('public/dists/maverick/main/binary-amd64/Packages.bz2') + + # verify contents except of sums + self.check_file_contents('public/dists/maverick/Release', 'release', match_prepare=strip_processor)