Tests for flat repository mirroring.

This commit is contained in:
Andrey Smirnov
2014-02-10 15:06:11 +04:00
parent 955b09a41c
commit d0e73a3e00
6 changed files with 75 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
Downloading http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/InRelease...
Downloading http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/Release...
Downloading http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/Release.gpg...
gpgv: Signature made Tue May 21 23:01:30 2013 MSK using DSA key ID 1048C1FF
gpgv: Good signature from "home:DeepDiver1975 OBS Project <home:DeepDiver1975@build.opensuse.org>"
Mirror [mirror14]: http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/ successfully added.
You can run 'aptly mirror update mirror14' to download repository contents.

View File

@@ -0,0 +1,14 @@
Name: mirror14
Archive Root URL: http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/
Distribution:
Components:
Architectures:
Last update: never
Information from release file:
Date: Tue May 21 21:01:30 2013
Description: Open Build Service home:DeepDiver1975 xUbuntu_10.04
Label: DeepDiver1975's Home Project (xUbuntu_10.04)
Origin: Open Build Service home:DeepDiver1975 xUbuntu_10.04
Version: 0.00

View File

@@ -0,0 +1 @@
ERROR: unable to create mirror: components aren't supported for flat repos

View File

@@ -0,0 +1,18 @@
Building download queue...
Download queue: 4 items, 0.00 GiB size
Downloading & parsing package files...
Downloading http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/InRelease...
Downloading http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/Packages.bz2...
Downloading http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/Packages.gz...
Downloading http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/Release...
Downloading http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/Release.gpg...
Downloading http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/amd64/libiniparser-dev_3.1-1_amd64.deb...
Downloading http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/amd64/libiniparser_3.1-1_amd64.deb...
Downloading http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/i386/libiniparser-dev_3.1-1_i386.deb...
Downloading http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/i386/libiniparser_3.1-1_i386.deb...
Mirror `flat` has been successfully updated.
Saving packages to database...
gpgv: Good signature from "home:DeepDiver1975 OBS Project <home:DeepDiver1975@build.opensuse.org>"
gpgv: Signature made Tue May 21 23:01:30 2013 MSK using DSA key ID 1048C1FF

View File

@@ -147,3 +147,23 @@ class CreateMirror13Test(BaseTest):
def check(self):
self.check_output()
self.check_cmd_output("aptly mirror show mirror13", "mirror_show")
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/ ./"
fixtureGpg = True
def check(self):
self.check_output()
self.check_cmd_output("aptly mirror show mirror14", "mirror_show")
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"
expectedCode = 1

View File

@@ -81,3 +81,17 @@ class UpdateMirror6Test(BaseTest):
def gold_processor(self, gold):
return string.Template(gold).substitute({'url': self.webServerUrl})
class UpdateMirror7Test(BaseTest):
"""
update mirrors: flat repository
"""
fixtureGpg = True
fixtureCmds = [
"aptly mirror create --keyring=aptlytest.gpg flat http://download.opensuse.org/repositories/home:/DeepDiver1975/xUbuntu_10.04/ ./",
]
runCmd = "aptly mirror update --keyring=aptlytest.gpg flat"
def output_processor(self, output):
return "\n".join(sorted(output.split("\n")))