mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
Tests for flat repository mirroring.
This commit is contained in:
8
system/t04_mirror/CreateMirror14Test_gold
Normal file
8
system/t04_mirror/CreateMirror14Test_gold
Normal 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.
|
||||
14
system/t04_mirror/CreateMirror14Test_mirror_show
Normal file
14
system/t04_mirror/CreateMirror14Test_mirror_show
Normal 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
|
||||
1
system/t04_mirror/CreateMirror15Test_gold
Normal file
1
system/t04_mirror/CreateMirror15Test_gold
Normal file
@@ -0,0 +1 @@
|
||||
ERROR: unable to create mirror: components aren't supported for flat repos
|
||||
18
system/t04_mirror/UpdateMirror7Test_gold
Normal file
18
system/t04_mirror/UpdateMirror7Test_gold
Normal 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
|
||||
@@ -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
|
||||
|
||||
@@ -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")))
|
||||
|
||||
Reference in New Issue
Block a user