Tests for guessing publishing defaults from local repo params. #12

This commit is contained in:
Andrey Smirnov
2014-03-26 21:40:17 +04:00
parent 0f8f43b9f0
commit 53e73c52a4
7 changed files with 154 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
Loading packages...
Generating metadata files and linking package files...
Signing file '${HOME}/.aptly/public/dists/maverick/Release' with gpg, please enter your passphrase when prompted:
Clearsigning file '${HOME}/.aptly/public/dists/maverick/Release' with gpg, please enter your passphrase when prompted:
Local repo local-repo has been successfully published.
Please setup your webserver to serve directory '${HOME}/.aptly/public' with autoindexing.
Now you can add following line to apt sources:
deb http://your-server/ maverick contrib
deb-src http://your-server/ maverick contrib
Don't forget to add your GPG key to apt with apt-key.
You can also use `aptly serve` to publish your repositories over HTTP quickly.

View File

@@ -0,0 +1,11 @@
Loading packages...
Generating metadata files and linking package files...
Snapshot snap3 has been successfully published.
Please setup your webserver to serve directory '${HOME}/.aptly/public' with autoindexing.
Now you can add following line to apt sources:
deb http://your-server/ maverick main
deb-src http://your-server/ maverick main
Don't forget to add your GPG key to apt with apt-key.
You can also use `aptly serve` to publish your repositories over HTTP quickly.

View File

@@ -0,0 +1 @@
ERROR: unable to publish: unable to guess distribution name, please specify explicitly

View File

@@ -0,0 +1,11 @@
Loading packages...
Generating metadata files and linking package files...
Snapshot snap3 has been successfully published.
Please setup your webserver to serve directory '${HOME}/.aptly/public' with autoindexing.
Now you can add following line to apt sources:
deb http://your-server/ maverick main
deb-src http://your-server/ maverick main
Don't forget to add your GPG key to apt with apt-key.
You can also use `aptly serve` to publish your repositories over HTTP quickly.

View File

@@ -0,0 +1,11 @@
Loading packages...
Generating metadata files and linking package files...
Snapshot snap3 has been successfully published.
Please setup your webserver to serve directory '${HOME}/.aptly/public' with autoindexing.
Now you can add following line to apt sources:
deb http://your-server/ maverick main
deb-src http://your-server/ maverick main
Don't forget to add your GPG key to apt with apt-key.
You can also use `aptly serve` to publish your repositories over HTTP quickly.

View File

@@ -306,3 +306,37 @@ class PublishRepo13Test(BaseTest):
]
runCmd = "aptly publish repo --distribution=mars --skip-signing local-repo"
expectedCode = 1
class PublishRepo14Test(BaseTest):
"""
publish repo: publishing defaults from local repo
"""
fixtureCmds = [
"aptly repo create -distribution=maverick -component=contrib local-repo",
"aptly repo add local-repo ${files}",
]
runCmd = "aptly publish repo -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec local-repo"
gold_processor = BaseTest.expand_environ
def check(self):
super(PublishRepo14Test, self).check()
self.check_exists('public/dists/maverick/InRelease')
self.check_exists('public/dists/maverick/Release')
self.check_exists('public/dists/maverick/Release.gpg')
self.check_exists('public/dists/maverick/contrib/binary-i386/Packages')
self.check_exists('public/dists/maverick/contrib/binary-i386/Packages.gz')
self.check_exists('public/dists/maverick/contrib/binary-i386/Packages.bz2')
self.check_exists('public/dists/maverick/contrib/source/Sources')
self.check_exists('public/dists/maverick/contrib/source/Sources.gz')
self.check_exists('public/dists/maverick/contrib/source/Sources.bz2')
self.check_exists('public/pool/contrib/p/pyspi/pyspi_0.6.1-1.3.dsc')
self.check_exists('public/pool/contrib/p/pyspi/pyspi_0.6.1-1.3.diff.gz')
self.check_exists('public/pool/contrib/p/pyspi/pyspi_0.6.1.orig.tar.gz')
self.check_exists('public/pool/contrib/p/pyspi/pyspi-0.6.1-1.3.stripped.dsc')
self.check_exists('public/pool/contrib/b/boost-defaults/libboost-program-options-dev_1.49.0.1_i386.deb')

View File

@@ -483,3 +483,76 @@ class PublishSnapshot19Test(BaseTest):
]
runCmd = "aptly publish snapshot -skip-signing snap5"
gold_processor = BaseTest.expand_environ
class PublishSnapshot20Test(BaseTest):
"""
publish snapshot: guess distribution from long chain including local repo
"""
fixtureDB = True
fixturePool = True
fixtureCmds = [
"aptly snapshot create snap1 from mirror gnuplot-maverick",
"aptly repo create -distribution=maverick local-repo",
"aptly repo add local-repo ${files}",
"aptly snapshot create snap2 from repo local-repo",
"aptly snapshot merge snap3 snap1 snap2",
]
runCmd = "aptly publish snapshot -skip-signing snap3"
gold_processor = BaseTest.expand_environ
class PublishSnapshot21Test(BaseTest):
"""
publish snapshot: conflict in distributions
"""
fixtureDB = True
fixturePool = True
fixtureCmds = [
"aptly snapshot create snap1 from mirror gnuplot-maverick",
"aptly repo create -distribution=squeeze local-repo",
"aptly repo add local-repo ${files}",
"aptly snapshot create snap2 from repo local-repo",
"aptly snapshot merge snap3 snap1 snap2",
]
runCmd = "aptly publish snapshot -skip-signing snap3"
gold_processor = BaseTest.expand_environ
expectedCode = 1
class PublishSnapshot22Test(BaseTest):
"""
publish snapshot: conflict in components
"""
fixtureDB = True
fixturePool = True
fixtureCmds = [
"aptly snapshot create snap1 from mirror gnuplot-maverick",
"aptly repo create -component=contrib -distribution=maverick local-repo",
"aptly repo add local-repo ${files}",
"aptly snapshot create snap2 from repo local-repo",
"aptly snapshot merge snap3 snap1 snap2",
]
runCmd = "aptly publish snapshot -skip-signing snap3"
gold_processor = BaseTest.expand_environ
class PublishSnapshot23Test(BaseTest):
"""
publish snapshot: distribution empty plus distribution maverick
"""
fixtureDB = True
fixturePool = True
fixtureCmds = [
"aptly snapshot create snap1 from mirror gnuplot-maverick",
"aptly repo create local-repo",
"aptly repo add local-repo ${files}",
"aptly snapshot create snap2 from repo local-repo",
"aptly snapshot merge snap3 snap1 snap2",
]
runCmd = "aptly publish snapshot -skip-signing snap3"
gold_processor = BaseTest.expand_environ