Support for Go-style templating in format for aptly * search. #254

This commit is contained in:
Andrey Smirnov
2015-07-02 12:19:41 +03:00
parent 6c28e3aca8
commit 8bda799545
14 changed files with 16521 additions and 12 deletions
File diff suppressed because it is too large Load Diff
+9
View File
@@ -34,3 +34,12 @@ class SearchMirror4Test(BaseTest):
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
runCmd = "aptly mirror search -with-deps wheezy-main 'Name (nginx)'"
class SearchMirror5Test(BaseTest):
"""
search mirror: regular search
"""
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
runCmd = "aptly mirror search -format='{{.Package}}#{{.Version}}' wheezy-main '$$Architecture (i386), Name (% *-dev)'"
File diff suppressed because it is too large Load Diff
+10
View File
@@ -47,3 +47,13 @@ class SearchSnapshot5Test(BaseTest):
fixtureCmds = ["aptly snapshot create wheezy-main from mirror wheezy-main"]
runCmd = "aptly snapshot search -with-deps wheezy-main 'Name (no-such-package)'"
expectedCode = 1
class SearchSnapshot6Test(BaseTest):
"""
search snapshot: with format
"""
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
fixtureCmds = ["aptly snapshot create wheezy-main from mirror wheezy-main"]
runCmd = "aptly snapshot search -format='{{.Package}}#{{.Version}}' wheezy-main '$$Architecture (i386), Name (% *-dev)'"
File diff suppressed because it is too large Load Diff
+10
View File
@@ -37,3 +37,13 @@ class SearchRepo4Test(BaseTest):
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 (nginx)'"
class SearchRepo5Test(BaseTest):
"""
search repo: with -format
"""
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 -format='{{.Package}}#{{.Version}}' wheezy-main '$$Architecture (i386), Name (% *-dev)'"
File diff suppressed because it is too large Load Diff
+9
View File
@@ -33,3 +33,12 @@ class SearchPackage4Test(BaseTest):
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
runCmd = "aptly package search coreutils"
class SearchPackage5Test(BaseTest):
"""
search package: with format
"""
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
runCmd = "aptly package search -format='{{.Package}}#{{.Version}}' '$$Architecture (i386), Name (% *-dev)'"