From b5f35cd5401266391d9ab0c710c2d7f2be30285f Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Thu, 6 Mar 2014 21:18:26 +0400 Subject: [PATCH] Test for ppa short URL in aptly mirror create. --- system/t03_help/MirrorCreateHelpTest_gold | 3 +++ system/t04_mirror/CreateMirror18Test_gold | 8 ++++++++ .../t04_mirror/CreateMirror18Test_mirror_show | 19 +++++++++++++++++++ system/t04_mirror/create.py | 19 +++++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 system/t04_mirror/CreateMirror18Test_gold create mode 100644 system/t04_mirror/CreateMirror18Test_mirror_show diff --git a/system/t03_help/MirrorCreateHelpTest_gold b/system/t03_help/MirrorCreateHelpTest_gold index 52764a90..6cb85059 100644 --- a/system/t03_help/MirrorCreateHelpTest_gold +++ b/system/t03_help/MirrorCreateHelpTest_gold @@ -2,6 +2,9 @@ Usage: aptly mirror create [ ... Create records information about new mirror and fetches Release file (it doesn't download packages). +PPA url could specified in short format when running on Debian/Ubuntu: + $ aptly mirror create some_ppa ppa:user/project + ex: $ aptly mirror create wheezy-main http://mirror.yandex.ru/debian/ wheezy main diff --git a/system/t04_mirror/CreateMirror18Test_gold b/system/t04_mirror/CreateMirror18Test_gold new file mode 100644 index 00000000..ed8365b7 --- /dev/null +++ b/system/t04_mirror/CreateMirror18Test_gold @@ -0,0 +1,8 @@ +Downloading http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/dists/maverick/InRelease... +Downloading http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/dists/maverick/Release... +Downloading http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/dists/maverick/Release.gpg... +gpgv: RSA key ID 3B1F56C0 +gpgv: Good signature from "Launchpad sim" + +Mirror [mirror18]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick successfully added. +You can run 'aptly mirror update mirror18' to download repository contents. diff --git a/system/t04_mirror/CreateMirror18Test_mirror_show b/system/t04_mirror/CreateMirror18Test_mirror_show new file mode 100644 index 00000000..abd2a7d1 --- /dev/null +++ b/system/t04_mirror/CreateMirror18Test_mirror_show @@ -0,0 +1,19 @@ +Name: mirror18 +Archive Root URL: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ +Distribution: maverick +Components: main +Architectures: amd64, armel, i386, powerpc +Download Sources: no +Last update: never + +Information from release file: +Architectures: amd64 armel i386 powerpc +Codename: maverick +Components: main +Date: Mon, 22 Oct 2012 13:19:50 UTC +Description: Ubuntu Maverick 10.10 + +Label: gnuplot +Origin: LP-PPA-gladky-anton-gnuplot +Suite: maverick +Version: 10.10 diff --git a/system/t04_mirror/create.py b/system/t04_mirror/create.py index 364cacf3..d8750fda 100644 --- a/system/t04_mirror/create.py +++ b/system/t04_mirror/create.py @@ -188,3 +188,22 @@ class CreateMirror17Test(BaseTest): def check(self): self.check_output() self.check_cmd_output("aptly mirror show mirror17", "mirror_show") + + +class CreateMirror18Test(BaseTest): + """ + create mirror: mirror with ppa URL + """ + fixtureGpg = True + outputMatchPrepare = lambda _, s: re.sub(r'Signature made .* using', '', s) + + configOverride = { + "ppaDistributorID": "ubuntu", + "ppaCodename": "maverick", + } + + runCmd = "aptly mirror create -keyring=aptlytest.gpg mirror18 ppa:gladky-anton/gnuplot" + + def check(self): + self.check_output() + self.check_cmd_output("aptly mirror show mirror18", "mirror_show")