mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-08 05:50:47 +00:00
Release file: support Version field
https://wiki.debian.org/DebianRepository/Format#Version The Version field, if specified, shall be the version of the release. On the other hand, if not set or set to an empty value, the Version field will not be included in the Release file. Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
This commit is contained in:
@@ -629,7 +629,7 @@ class PublishUpdate19Test(BaseTest):
|
||||
|
||||
class PublishUpdate20Test(BaseTest):
|
||||
"""
|
||||
publish update: update label and origin
|
||||
publish update: update label, origin, version
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly repo create local-repo",
|
||||
@@ -637,7 +637,7 @@ class PublishUpdate20Test(BaseTest):
|
||||
"aptly publish repo -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=maverick -skip-bz2 local-repo",
|
||||
"aptly repo remove local-repo pyspi"
|
||||
]
|
||||
runCmd = "aptly publish update -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -label=fun -origin=earth maverick"
|
||||
runCmd = "aptly publish update -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -label=fun -origin=earth -version=13.3 maverick"
|
||||
gold_processor = BaseTest.expand_environ
|
||||
|
||||
def check(self):
|
||||
@@ -647,3 +647,25 @@ class PublishUpdate20Test(BaseTest):
|
||||
|
||||
# verify contents except of sums
|
||||
self.check_file_contents('public/dists/maverick/Release', 'release', match_prepare=strip_processor)
|
||||
|
||||
|
||||
class PublishUpdate21Test(BaseTest):
|
||||
"""
|
||||
publish update: update version with empty value
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly repo create local-repo",
|
||||
"aptly repo add local-repo ${files}/",
|
||||
"aptly publish repo -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=maverick -skip-bz2 -version=13.3 local-repo",
|
||||
"aptly repo remove local-repo pyspi"
|
||||
]
|
||||
runCmd = "aptly publish update -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -version='' maverick"
|
||||
gold_processor = BaseTest.expand_environ
|
||||
|
||||
def check(self):
|
||||
super(PublishUpdate21Test, self).check()
|
||||
|
||||
self.check_exists('public/dists/maverick/InRelease')
|
||||
|
||||
# verify contents except of sums
|
||||
self.check_file_contents('public/dists/maverick/Release', 'release', match_prepare=strip_processor)
|
||||
|
||||
Reference in New Issue
Block a user