aptly repo add now exists with non-zero exit code if some files fail to add. #54

This commit is contained in:
Andrey Smirnov
2014-05-17 22:23:20 +04:00
parent 4240b134e6
commit 8b2920d5dd
6 changed files with 36 additions and 2 deletions
+3
View File
@@ -1,2 +1,5 @@
Loading packages...
[!] Unable to import file /02/03/pyspi_0.6.1-1.3.diff.gz into pool: open /02/03/pyspi_0.6.1-1.3.diff.gz: no such file or directory
[!] Some files were skipped due to errors:
/02/03/pyspi_0.6.1-1.3.dsc
ERROR: Some files failed to be added
+3
View File
@@ -1,2 +1,5 @@
Loading packages...
[!] Unable to process no-such-file: stat no-such-file: no such file or directory
[!] Some files were skipped due to errors:
no-such-file
ERROR: Some files failed to be added
+4 -1
View File
@@ -1,2 +1,5 @@
Loading packages...
[!] Unable to save package pyspi_0.6.1-1.3_source: unable to save: pyspi_0.6.1-1.3_source, conflict with existing packge
[!] Unable to save package pyspi_0.6.1-1.3_source: unable to save: pyspi_0.6.1-1.3_source, conflict with existing package
[!] Some files were skipped due to errors:
/Users/smira/Documents/go/src/github.com/smira/aptly/system/t09_repo/AddRepo8Test/pyspi_0.6.1-1.3.conflict.dsc
ERROR: Some files failed to be added
+3
View File
@@ -1,2 +1,5 @@
Loading packages...
[!] Unable to import file /pyspi_0.6.1.orig.tar.gz into pool: unable to import into pool: file ${HOME}/.aptly/pool/de/f3/pyspi_0.6.1.orig.tar.gz already exists
[!] Some files were skipped due to errors:
/pyspi_0.6.1-1.3.dsc
ERROR: Some files failed to be added
+6 -1
View File
@@ -125,6 +125,7 @@ class AddRepo5Test(BaseTest):
]
runCmd = "aptly repo add repo5 "
outputMatchPrepare = lambda self, s: s.replace(self.tempSrcDir, "")
expectedCode = 1
def prepare(self):
super(AddRepo5Test, self).prepare()
@@ -154,6 +155,7 @@ class AddRepo6Test(BaseTest):
"aptly repo create -comment=Repo6 -distribution=squeeze repo6",
]
runCmd = "aptly repo add repo6 no-such-file"
expectedCode = 1
class AddRepo7Test(BaseTest):
@@ -173,6 +175,8 @@ class AddRepo8Test(BaseTest):
"aptly repo add repo8 ${files}/pyspi_0.6.1-1.3.dsc",
]
runCmd = "aptly repo add repo8 ${testfiles}/pyspi_0.6.1-1.3.conflict.dsc"
outputMatchPrepare = lambda self, s: s.replace(os.path.join(os.path.dirname(inspect.getsourcefile(BaseTest)), "files"), "")
expectedCode = 1
def check(self):
self.check_output()
@@ -187,8 +191,9 @@ class AddRepo9Test(BaseTest):
"aptly repo create -comment=Repo9 -distribution=squeeze repo9",
]
runCmd = "aptly repo add repo9 ${files}/pyspi_0.6.1-1.3.dsc"
outputMatchPrepare = lambda self, s: s.replace(os.path.join(os.path.dirname(inspect.getsourcefile(BaseTest)), "files"), "")
outputMatchPrepare = lambda self, s: s.replace(os.path.join(os.path.dirname(inspect.getsourcefile(self.__class__)), self.__class__.__name__), "").replace(os.path.join(os.path.dirname(inspect.getsourcefile(BaseTest)), "files"), "")
gold_processor = BaseTest.expand_environ
expectedCode = 1
def prepare(self):
super(AddRepo9Test, self).prepare()