mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
System tests for mirror create with filter. #64
This commit is contained in:
4
system/t04_mirror/CreateMirror22Test_gold
Normal file
4
system/t04_mirror/CreateMirror22Test_gold
Normal file
@@ -0,0 +1,4 @@
|
||||
Downloading http://security.debian.org/dists/wheezy/updates/Release...
|
||||
|
||||
Mirror [mirror22]: http://security.debian.org/ wheezy/updates successfully added.
|
||||
You can run 'aptly mirror update mirror22' to download repository contents.
|
||||
22
system/t04_mirror/CreateMirror22Test_mirror_show
Normal file
22
system/t04_mirror/CreateMirror22Test_mirror_show
Normal file
@@ -0,0 +1,22 @@
|
||||
Name: mirror22
|
||||
Archive Root URL: http://security.debian.org/
|
||||
Distribution: wheezy/updates
|
||||
Components: main
|
||||
Architectures: amd64, armel, armhf, i386, ia64, kfreebsd-amd64, kfreebsd-i386, mips, mipsel, powerpc, s390, s390x, sparc
|
||||
Download Sources: no
|
||||
Filter: nginx | Priority (required)
|
||||
Filter With Deps: no
|
||||
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: updates/main updates/contrib updates/non-free
|
||||
Date: Sun, 13 Jul 2014 12:12:08 UTC
|
||||
Description: Debian 7.0 Security Updates
|
||||
|
||||
Label: Debian-Security
|
||||
Origin: Debian
|
||||
Suite: stable
|
||||
Valid-Until: Wed, 23 Jul 2014 12:12:08 UTC
|
||||
Version: 7.0
|
||||
1
system/t04_mirror/CreateMirror23Test_gold
Normal file
1
system/t04_mirror/CreateMirror23Test_gold
Normal file
@@ -0,0 +1 @@
|
||||
ERROR: unable to create mirror: parsing failed: unexpected token <EOL>: expecting field or package name
|
||||
@@ -251,3 +251,25 @@ class CreateMirror21Test(BaseTest):
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show mirror21", "mirror_show", match_prepare=removeSHA512)
|
||||
|
||||
|
||||
class CreateMirror22Test(BaseTest):
|
||||
"""
|
||||
create mirror: mirror with filter
|
||||
"""
|
||||
runCmd = "aptly mirror create -ignore-signatures -filter='nginx | Priority (required)' mirror22 http://security.debian.org/ wheezy/updates main"
|
||||
|
||||
def check(self):
|
||||
def removeDates(s):
|
||||
return re.sub(r"(Date|Valid-Until): [,0-9:+A-Za-z -]+\n", "", s)
|
||||
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly mirror show mirror22", "mirror_show", match_prepare=removeDates)
|
||||
|
||||
|
||||
class CreateMirror23Test(BaseTest):
|
||||
"""
|
||||
create mirror: mirror with wrong filter
|
||||
"""
|
||||
runCmd = "aptly mirror create -ignore-signatures -filter='nginx | ' mirror23 http://security.debian.org/ wheezy/updates main"
|
||||
expectedCode = 1
|
||||
|
||||
Reference in New Issue
Block a user