diff --git a/system/t04_mirror/CreateMirror16Test_gold b/system/t04_mirror/CreateMirror16Test_gold new file mode 100644 index 00000000..5c2d6d64 --- /dev/null +++ b/system/t04_mirror/CreateMirror16Test_gold @@ -0,0 +1,2 @@ +Downloading http://mirror.yandex.ru/debian/dists/wheezy/Release... +ERROR: unable to fetch mirror: architecture source not available in repo [mirror16]: http://mirror.yandex.ru/debian/ wheezy diff --git a/system/t04_mirror/CreateMirror17Test_gold b/system/t04_mirror/CreateMirror17Test_gold new file mode 100644 index 00000000..2aae26c6 --- /dev/null +++ b/system/t04_mirror/CreateMirror17Test_gold @@ -0,0 +1,4 @@ +Downloading http://mirror.yandex.ru/debian/dists/wheezy/Release... + +Mirror [mirror17]: http://mirror.yandex.ru/debian/ wheezy [src] successfully added. +You can run 'aptly mirror update mirror17' to download repository contents. diff --git a/system/t04_mirror/CreateMirror17Test_mirror_show b/system/t04_mirror/CreateMirror17Test_mirror_show new file mode 100644 index 00000000..d21aa474 --- /dev/null +++ b/system/t04_mirror/CreateMirror17Test_mirror_show @@ -0,0 +1,19 @@ +Name: mirror17 +Archive Root URL: http://mirror.yandex.ru/debian/ +Distribution: wheezy +Components: main, contrib, non-free +Architectures: i386 +Download Sources: yes +Last update: never + +Information from release file: +Architectures: amd64 armel armhf i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 s390x sparc +Codename: wheezy +Components: main contrib non-free +Date: Sat, 08 Feb 2014 10:36:03 UTC +Description: Debian 7.4 Released 08 February 2014 + +Label: Debian +Origin: Debian +Suite: stable +Version: 7.4 diff --git a/system/t04_mirror/ListMirror1Test_gold b/system/t04_mirror/ListMirror1Test_gold index 4c982784..87670d94 100644 --- a/system/t04_mirror/ListMirror1Test_gold +++ b/system/t04_mirror/ListMirror1Test_gold @@ -1,6 +1,7 @@ List of mirrors: * [mirror1]: http://mirror.yandex.ru/debian/ wheezy - * [mirror2]: http://mirror.yandex.ru/debian/ squeeze + * [mirror2]: http://mirror.yandex.ru/debian/ squeeze [src] * [mirror3]: http://mirror.yandex.ru/debian/ squeeze + * [mirror4]: http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/ ./ To get more information about mirror, run `aptly mirror show `. diff --git a/system/t04_mirror/create.py b/system/t04_mirror/create.py index 3e7ec7bf..364cacf3 100644 --- a/system/t04_mirror/create.py +++ b/system/t04_mirror/create.py @@ -153,7 +153,7 @@ class CreateMirror14Test(BaseTest): """ create mirror: flat repository """ - runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror14 http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/ ./" + runCmd = "aptly mirror create -keyring=aptlytest.gpg mirror14 http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/ ./" fixtureGpg = True outputMatchPrepare = lambda _, s: re.sub(r'Signature made .* using', '', s) @@ -166,5 +166,25 @@ class CreateMirror15Test(BaseTest): """ create mirror: flat repository + components """ - runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror14 http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/ ./ main" + runCmd = "aptly mirror create -keyring=aptlytest.gpg mirror14 http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/ ./ main" expectedCode = 1 + + +class CreateMirror16Test(BaseTest): + """ + create mirror: there's no "source" architecture + """ + expectedCode = 1 + + runCmd = "aptly -architectures=source mirror create -ignore-signatures mirror16 http://mirror.yandex.ru/debian/ wheezy" + + +class CreateMirror17Test(BaseTest): + """ + create mirror: mirror with sources enabled + """ + runCmd = "aptly -architectures=i386 mirror create -ignore-signatures -with-sources mirror17 http://mirror.yandex.ru/debian/ wheezy" + + def check(self): + self.check_output() + self.check_cmd_output("aptly mirror show mirror17", "mirror_show") diff --git a/system/t04_mirror/list.py b/system/t04_mirror/list.py index 050cca3b..31bf36f5 100644 --- a/system/t04_mirror/list.py +++ b/system/t04_mirror/list.py @@ -7,8 +7,9 @@ class ListMirror1Test(BaseTest): """ fixtureCmds = [ "aptly mirror create --ignore-signatures mirror1 http://mirror.yandex.ru/debian/ wheezy", - "aptly mirror create --ignore-signatures mirror2 http://mirror.yandex.ru/debian/ squeeze contrib", + "aptly mirror create -with-sources --ignore-signatures mirror2 http://mirror.yandex.ru/debian/ squeeze contrib", "aptly -architectures=i386 mirror create --ignore-signatures mirror3 http://mirror.yandex.ru/debian/ squeeze non-free", + "aptly mirror create -ignore-signatures mirror4 http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/ ./", ] runCmd = "aptly mirror list"