Implement new command aptly repo create ... from snapshot ...

This commit is contained in:
Andrey Smirnov
2017-03-03 23:30:09 +03:00
parent bc3b2ed5a8
commit f17d398e8f
6 changed files with 68 additions and 3 deletions
+3
View File
@@ -0,0 +1,3 @@
Local repo [repo2] successfully added.
You can run 'aptly repo add repo2 ...' to add packages to repository.
@@ -0,0 +1,9 @@
Name: repo2
Comment:
Default Distribution:
Default Component: main
Number of packages: 3
Packages:
libboost-program-options-dev_1.49.0.1_i386
pyspi_0.6.1-1.3_source
pyspi_0.6.1-1.4_source
+1
View File
@@ -0,0 +1 @@
ERROR: unable to load source snapshot: snapshot with name snap-missing not found
+24
View File
@@ -63,3 +63,27 @@ class CreateRepo6Test(BaseTest):
runCmd = "aptly repo create -uploaders-file=${changes}/uploaders-not-found.json repo6"
expectedCode = 1
outputMatchPrepare = changesRemove
class CreateRepo7Test(BaseTest):
"""
create local repo: from snapshot
"""
fixtureCmds = [
"aptly repo create repo1",
"aptly repo add repo1 ${files}",
"aptly snapshot create snap1 from repo repo1",
]
runCmd = "aptly repo create repo2 from snapshot snap1"
def check(self):
self.check_output()
self.check_cmd_output("aptly repo show -with-packages repo2", "repo_show")
class CreateRepo8Test(BaseTest):
"""
create local repo: from missing snapshot
"""
runCmd = "aptly repo create repo2 from snapshot snap-missing"
expectedCode = 1