Fix system tests for aptly repo add

This commit is contained in:
Andrey Smirnov
2017-04-22 00:52:43 +03:00
parent b7b9f12c88
commit 4601f07349
2 changed files with 24 additions and 23 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
Loading packages... 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 [!] Unable to import file /pyspi_0.6.1.orig.tar.gz into pool: unable to import into pool: file ${HOME}/.aptly/pool/64/06/9ee828c50b1c597d10a3fefbba27_pyspi_0.6.1.orig.tar.gz already exists
[!] Some files were skipped due to errors: [!] Some files were skipped due to errors:
/pyspi_0.6.1-1.3.dsc /pyspi_0.6.1-1.3.dsc
ERROR: some files failed to be added ERROR: some files failed to be added
+23 -22
View File
@@ -19,7 +19,7 @@ class AddRepo1Test(BaseTest):
self.check_cmd_output("aptly repo show -with-packages repo1", "repo_show") self.check_cmd_output("aptly repo show -with-packages repo1", "repo_show")
# check pool # check pool
self.check_exists('pool/00/35/libboost-program-options-dev_1.49.0.1_i386.deb') self.check_exists('pool/c7/6b/4bd12fd92e4dfe1b55b18a67a669_libboost-program-options-dev_1.49.0.1_i386.deb')
class AddRepo2Test(BaseTest): class AddRepo2Test(BaseTest):
@@ -36,10 +36,10 @@ class AddRepo2Test(BaseTest):
self.check_cmd_output("aptly repo show -with-packages repo2", "repo_show") self.check_cmd_output("aptly repo show -with-packages repo2", "repo_show")
# check pool # check pool
self.check_exists('pool/22/ff/pyspi_0.6.1-1.3.diff.gz') self.check_exists('pool/2e/77/0b28df948f3197ed0b679bdea99f_pyspi_0.6.1-1.3.diff.gz')
self.check_exists('pool/b7/2c/pyspi_0.6.1-1.3.dsc') self.check_exists('pool/d4/94/aaf526f1ec6b02f14c2f81e060a5_pyspi_0.6.1-1.3.dsc')
self.check_exists('pool/de/f3/pyspi_0.6.1.orig.tar.gz') self.check_exists('pool/64/06/9ee828c50b1c597d10a3fefbba27_pyspi_0.6.1.orig.tar.gz')
self.check_exists('pool/2f/5b/pyspi-0.6.1-1.3.stripped.dsc') self.check_exists('pool/28/9d/3aefa970876e9c43686ce2b02f47_pyspi-0.6.1-1.3.stripped.dsc')
class AddRepo3Test(BaseTest): class AddRepo3Test(BaseTest):
@@ -56,11 +56,11 @@ class AddRepo3Test(BaseTest):
self.check_cmd_output("aptly repo show -with-packages repo3", "repo_show") self.check_cmd_output("aptly repo show -with-packages repo3", "repo_show")
# check pool # check pool
self.check_exists('pool/00/35/libboost-program-options-dev_1.49.0.1_i386.deb') self.check_exists('pool/c7/6b/4bd12fd92e4dfe1b55b18a67a669_libboost-program-options-dev_1.49.0.1_i386.deb')
self.check_exists('pool/22/ff/pyspi_0.6.1-1.3.diff.gz') self.check_exists('pool/2e/77/0b28df948f3197ed0b679bdea99f_pyspi_0.6.1-1.3.diff.gz')
self.check_exists('pool/b7/2c/pyspi_0.6.1-1.3.dsc') self.check_exists('pool/d4/94/aaf526f1ec6b02f14c2f81e060a5_pyspi_0.6.1-1.3.dsc')
self.check_exists('pool/de/f3/pyspi_0.6.1.orig.tar.gz') self.check_exists('pool/64/06/9ee828c50b1c597d10a3fefbba27_pyspi_0.6.1.orig.tar.gz')
self.check_exists('pool/2f/5b/pyspi-0.6.1-1.3.stripped.dsc') self.check_exists('pool/28/9d/3aefa970876e9c43686ce2b02f47_pyspi-0.6.1-1.3.stripped.dsc')
class AddRepo4Test(BaseTest): class AddRepo4Test(BaseTest):
@@ -97,10 +97,10 @@ class AddRepo4Test(BaseTest):
self.check_cmd_output("aptly repo show -with-packages repo4", "repo_show") self.check_cmd_output("aptly repo show -with-packages repo4", "repo_show")
# check pool # check pool
self.check_exists('pool/00/35/libboost-program-options-dev_1.49.0.1_i386.deb') self.check_exists('pool/c7/6b/4bd12fd92e4dfe1b55b18a67a669_libboost-program-options-dev_1.49.0.1_i386.deb')
self.check_exists('pool/22/ff/pyspi_0.6.1-1.3.diff.gz') self.check_exists('pool/2e/77/0b28df948f3197ed0b679bdea99f_pyspi_0.6.1-1.3.diff.gz')
self.check_exists('pool/b7/2c/pyspi_0.6.1-1.3.dsc') self.check_exists('pool/d4/94/aaf526f1ec6b02f14c2f81e060a5_pyspi_0.6.1-1.3.dsc')
self.check_exists('pool/de/f3/pyspi_0.6.1.orig.tar.gz') self.check_exists('pool/64/06/9ee828c50b1c597d10a3fefbba27_pyspi_0.6.1.orig.tar.gz')
path = os.path.join(self.tempSrcDir, "01", "libboost-program-options-dev_1.49.0.1_i386.deb") path = os.path.join(self.tempSrcDir, "01", "libboost-program-options-dev_1.49.0.1_i386.deb")
if os.path.exists(path): if os.path.exists(path):
@@ -198,8 +198,8 @@ class AddRepo9Test(BaseTest):
def prepare(self): def prepare(self):
super(AddRepo9Test, self).prepare() super(AddRepo9Test, self).prepare()
os.makedirs(os.path.join(os.environ["HOME"], ".aptly", "pool/de/f3/")) os.makedirs(os.path.join(os.environ["HOME"], ".aptly", "pool/64/06/"))
with open(os.path.join(os.environ["HOME"], ".aptly", "pool/de/f3/pyspi_0.6.1.orig.tar.gz"), "w") as f: with open(os.path.join(os.environ["HOME"], ".aptly", "pool/64/06/9ee828c50b1c597d10a3fefbba27_pyspi_0.6.1.orig.tar.gz"), "w") as f:
f.write("abcd") f.write("abcd")
@@ -248,7 +248,7 @@ class AddRepo12Test(BaseTest):
self.check_cmd_output("aptly repo show -with-packages repo12", "repo_show") self.check_cmd_output("aptly repo show -with-packages repo12", "repo_show")
# check pool # check pool
self.check_exists('pool/72/16/dmraid-udeb_1.0.0.rc16-4.1_amd64.udeb') self.check_exists('pool/ef/ae/69921b97494e40437712053b60a5_dmraid-udeb_1.0.0.rc16-4.1_amd64.udeb')
class AddRepo13Test(BaseTest): class AddRepo13Test(BaseTest):
@@ -265,8 +265,8 @@ class AddRepo13Test(BaseTest):
self.check_cmd_output("aptly repo show -with-packages repo13", "repo_show") self.check_cmd_output("aptly repo show -with-packages repo13", "repo_show")
# check pool # check pool
self.check_exists('pool/72/16/dmraid-udeb_1.0.0.rc16-4.1_amd64.udeb') self.check_exists('pool/ef/ae/69921b97494e40437712053b60a5_dmraid-udeb_1.0.0.rc16-4.1_amd64.udeb')
self.check_exists('pool/b7/2c/pyspi_0.6.1-1.3.dsc') self.check_exists('pool/d4/94/aaf526f1ec6b02f14c2f81e060a5_pyspi_0.6.1-1.3.dsc')
class AddRepo14Test(BaseTest): class AddRepo14Test(BaseTest):
@@ -275,14 +275,15 @@ class AddRepo14Test(BaseTest):
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Repo14 -distribution=squeeze repo14", "aptly repo create -comment=Repo14 -distribution=squeeze repo14",
"aptly repo add repo14 ${files}/libboost-program-options-dev_1.49.0.1_i386.deb" "aptly repo add repo14 ${files}/libboost-program-options-dev_1.49.0.1_i386.deb",
"aptly publish repo -distribution=test1 -skip-signing repo14"
] ]
runCmd = "aptly repo add repo14 $aptlyroot/pool/00/35/libboost-program-options-dev_1.49.0.1_i386.deb" runCmd = "aptly repo add repo14 $aptlyroot/public/pool/"
def check(self): def check(self):
super(AddRepo14Test, self).check() super(AddRepo14Test, self).check()
# check pool # check pool
self.check_file_not_empty('pool/00/35/libboost-program-options-dev_1.49.0.1_i386.deb') self.check_exists('pool/c7/6b/4bd12fd92e4dfe1b55b18a67a669_libboost-program-options-dev_1.49.0.1_i386.deb')
class AddRepo15Test(BaseTest): class AddRepo15Test(BaseTest):