mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
System tests for mirror, snapshot, repo search. #81
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
ERROR: unable to search: local repo with name repo-xx not found
|
||||
@@ -0,0 +1 @@
|
||||
ERROR: unable to search: parsing failed: unexpected token <EOL>: expecting ')'
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
coreutils_8.13-3.5_amd64
|
||||
coreutils_8.13-3.5_i386
|
||||
dpkg_1.16.12_amd64
|
||||
dpkg_1.16.12_i386
|
||||
gcc-4.7-base_4.7.2-5_amd64
|
||||
gcc-4.7-base_4.7.2-5_i386
|
||||
install-info_4.13a.dfsg.1-10_amd64
|
||||
install-info_4.13a.dfsg.1-10_i386
|
||||
libacl1_2.2.51-8_amd64
|
||||
libacl1_2.2.51-8_i386
|
||||
libattr1_1:2.4.46-8_amd64
|
||||
libattr1_1:2.4.46-8_i386
|
||||
libbz2-1.0_1.0.6-4_amd64
|
||||
libbz2-1.0_1.0.6-4_i386
|
||||
libc-bin_2.13-38+deb7u1_amd64
|
||||
libc-bin_2.13-38+deb7u1_i386
|
||||
libc6_2.13-38+deb7u1_amd64
|
||||
libc6_2.13-38+deb7u1_i386
|
||||
libgcc1_1:4.7.2-5_amd64
|
||||
libgcc1_1:4.7.2-5_i386
|
||||
liblzma5_5.1.1alpha+20120614-2_amd64
|
||||
liblzma5_5.1.1alpha+20120614-2_i386
|
||||
libselinux1_2.1.9-5_amd64
|
||||
libselinux1_2.1.9-5_i386
|
||||
multiarch-support_2.13-38+deb7u1_amd64
|
||||
multiarch-support_2.13-38+deb7u1_i386
|
||||
tar_1.26+dfsg-0.1_amd64
|
||||
tar_1.26+dfsg-0.1_i386
|
||||
zlib1g_1:1.2.7.dfsg-13_amd64
|
||||
zlib1g_1:1.2.7.dfsg-13_i386
|
||||
@@ -13,3 +13,4 @@ from .move import *
|
||||
from .remove import *
|
||||
from .show import *
|
||||
from .rename import *
|
||||
from .search import *
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
from lib import BaseTest
|
||||
|
||||
|
||||
class SearchRepo1Test(BaseTest):
|
||||
"""
|
||||
search repo: regular search
|
||||
"""
|
||||
fixtureDB = True
|
||||
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
|
||||
fixtureCmds = ["aptly repo create wheezy-main", "aptly repo import wheezy-main wheezy-main Name"]
|
||||
runCmd = "aptly repo search wheezy-main '$$Architecture (i386), Name (% *-dev)'"
|
||||
|
||||
|
||||
class SearchRepo2Test(BaseTest):
|
||||
"""
|
||||
search repo: missing repo
|
||||
"""
|
||||
runCmd = "aptly repo search repo-xx 'Name'"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
class SearchRepo3Test(BaseTest):
|
||||
"""
|
||||
search repo: wrong expression
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixtureCmds = ["aptly repo create wheezy-main", "aptly repo import wheezy-main wheezy-main Name"]
|
||||
expectedCode = 1
|
||||
runCmd = "aptly repo search wheezy-main '$$Architecture (i386'"
|
||||
|
||||
|
||||
class SearchRepo4Test(BaseTest):
|
||||
"""
|
||||
search repo: with-deps search
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixtureCmds = ["aptly repo create wheezy-main", "aptly repo import wheezy-main wheezy-main Name"]
|
||||
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
|
||||
runCmd = "aptly repo search -with-deps wheezy-main 'Name (coreutils)'"
|
||||
Reference in New Issue
Block a user