mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
@@ -76,8 +76,8 @@ class AddRepo4Test(BaseTest):
|
||||
super(AddRepo4Test, self).prepare()
|
||||
|
||||
self.tempSrcDir = tempfile.mkdtemp()
|
||||
os.makedirs(os.path.join(self.tempSrcDir, "01"), 0755)
|
||||
os.makedirs(os.path.join(self.tempSrcDir, "02", "03"), 0755)
|
||||
os.makedirs(os.path.join(self.tempSrcDir, "01"), 0o755)
|
||||
os.makedirs(os.path.join(self.tempSrcDir, "02", "03"), 0o755)
|
||||
|
||||
shutil.copy(os.path.join(os.path.dirname(inspect.getsourcefile(BaseTest)), "files", "libboost-program-options-dev_1.49.0.1_i386.deb"),
|
||||
os.path.join(self.tempSrcDir, "01"))
|
||||
@@ -133,7 +133,7 @@ class AddRepo5Test(BaseTest):
|
||||
super(AddRepo5Test, self).prepare()
|
||||
|
||||
self.tempSrcDir = tempfile.mkdtemp()
|
||||
os.makedirs(os.path.join(self.tempSrcDir, "02", "03"), 0755)
|
||||
os.makedirs(os.path.join(self.tempSrcDir, "02", "03"), 0o755)
|
||||
|
||||
shutil.copy(os.path.join(os.path.dirname(inspect.getsourcefile(BaseTest)), "files", "pyspi_0.6.1-1.3.dsc"),
|
||||
os.path.join(self.tempSrcDir, "02", "03"))
|
||||
@@ -330,7 +330,7 @@ class AddRepo16Test(BaseTest):
|
||||
super(AddRepo16Test, self).prepare()
|
||||
|
||||
self.tempSrcDir = tempfile.mkdtemp()
|
||||
os.makedirs(os.path.join(self.tempSrcDir, "02", "03"), 0755)
|
||||
os.makedirs(os.path.join(self.tempSrcDir, "02", "03"), 0o755)
|
||||
|
||||
shutil.copy(os.path.join(os.path.dirname(inspect.getsourcefile(BaseTest)), "files", "pyspi_0.6.1-1.3.dsc"),
|
||||
os.path.join(self.tempSrcDir, "02", "03"))
|
||||
|
||||
@@ -5,6 +5,7 @@ class ImportRepo1Test(BaseTest):
|
||||
"""
|
||||
import to local repo: simple import
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureDB = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
@@ -16,14 +17,12 @@ class ImportRepo1Test(BaseTest):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly repo show -with-packages repo1", "repo_show")
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class ImportRepo2Test(BaseTest):
|
||||
"""
|
||||
import to local repo: import w/deps
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureDB = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
@@ -35,14 +34,12 @@ class ImportRepo2Test(BaseTest):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly repo show -with-packages repo1", "repo_show")
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class ImportRepo3Test(BaseTest):
|
||||
"""
|
||||
import to local repo: simple move w/deps but w/o archs
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureDB = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
@@ -50,14 +47,12 @@ class ImportRepo3Test(BaseTest):
|
||||
runCmd = "aptly repo import -with-deps wheezy-contrib repo1 redeclipse"
|
||||
expectedCode = 1
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class ImportRepo4Test(BaseTest):
|
||||
"""
|
||||
import to local repo: dry run
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureDB = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
@@ -68,14 +63,12 @@ class ImportRepo4Test(BaseTest):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly repo show -with-packages repo1", "repo_show")
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class ImportRepo5Test(BaseTest):
|
||||
"""
|
||||
import to local repo: wrong dep
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureDB = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
@@ -83,9 +76,6 @@ class ImportRepo5Test(BaseTest):
|
||||
runCmd = "aptly repo import wheezy-contrib repo1 'pyspi >> 0.6.1-1.3)'"
|
||||
expectedCode = 1
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class ImportRepo6Test(BaseTest):
|
||||
"""
|
||||
@@ -125,11 +115,9 @@ class ImportRepo9Test(BaseTest):
|
||||
"""
|
||||
import to local repo: import with complex query
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureDB = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
]
|
||||
runCmd = "aptly repo import wheezy-main repo1 '(httpd, $$Source (=nginx)) | exim4'"
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
+5
-15
@@ -5,6 +5,7 @@ class CopyRepo1Test(BaseTest):
|
||||
"""
|
||||
copy in local repo: simple copy
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo2",
|
||||
@@ -17,14 +18,12 @@ class CopyRepo1Test(BaseTest):
|
||||
self.check_cmd_output("aptly repo show -with-packages repo1", "repo1_show")
|
||||
self.check_cmd_output("aptly repo show -with-packages repo2", "repo2_show")
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class CopyRepo2Test(BaseTest):
|
||||
"""
|
||||
copy in local repo: simple copy w/deps
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo2",
|
||||
@@ -37,14 +36,12 @@ class CopyRepo2Test(BaseTest):
|
||||
self.check_cmd_output("aptly repo show -with-packages repo1", "repo1_show")
|
||||
self.check_cmd_output("aptly repo show -with-packages repo2", "repo2_show")
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class CopyRepo3Test(BaseTest):
|
||||
"""
|
||||
copy in local repo: simple copy w/deps but w/o archs
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo2",
|
||||
@@ -53,14 +50,12 @@ class CopyRepo3Test(BaseTest):
|
||||
runCmd = "aptly repo copy -with-deps repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386"
|
||||
expectedCode = 1
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class CopyRepo4Test(BaseTest):
|
||||
"""
|
||||
copy in local repo: dry run
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo2",
|
||||
@@ -73,14 +68,12 @@ class CopyRepo4Test(BaseTest):
|
||||
self.check_cmd_output("aptly repo show -with-packages repo1", "repo1_show")
|
||||
self.check_cmd_output("aptly repo show -with-packages repo2", "repo2_show")
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class CopyRepo5Test(BaseTest):
|
||||
"""
|
||||
copy in local repo: wrong dep
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo2",
|
||||
@@ -89,9 +82,6 @@ class CopyRepo5Test(BaseTest):
|
||||
runCmd = "aptly repo copy repo1 repo2 'pyspi >> 0.6.1-1.3)'"
|
||||
expectedCode = 1
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class CopyRepo6Test(BaseTest):
|
||||
"""
|
||||
|
||||
@@ -145,7 +145,7 @@ class IncludeRepo6Test(BaseTest):
|
||||
super(IncludeRepo6Test, self).prepare()
|
||||
|
||||
self.tempSrcDir = tempfile.mkdtemp()
|
||||
os.makedirs(os.path.join(self.tempSrcDir, "01"), 0755)
|
||||
os.makedirs(os.path.join(self.tempSrcDir, "01"), 0o755)
|
||||
|
||||
for path in ["hardlink_0.2.1.dsc", "hardlink_0.2.1_amd64.changes", "hardlink_0.2.1_amd64.deb"]:
|
||||
shutil.copy(os.path.join(os.path.dirname(inspect.getsourcefile(BaseTest)), "changes", path),
|
||||
@@ -536,7 +536,7 @@ class IncludeRepo22Test(BaseTest):
|
||||
super(IncludeRepo22Test, self).prepare()
|
||||
|
||||
self.tempSrcDir = tempfile.mkdtemp()
|
||||
os.makedirs(os.path.join(self.tempSrcDir, "01"), 0755)
|
||||
os.makedirs(os.path.join(self.tempSrcDir, "01"), 0o755)
|
||||
|
||||
for path in ["hardlink_0.2.1.dsc", "hardlink_0.2.1_amd64.deb"]:
|
||||
shutil.copy(os.path.join(os.path.dirname(inspect.getsourcefile(BaseTest)), "changes", path),
|
||||
|
||||
+5
-15
@@ -5,6 +5,7 @@ class MoveRepo1Test(BaseTest):
|
||||
"""
|
||||
move in local repo: simple move
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo2",
|
||||
@@ -17,14 +18,12 @@ class MoveRepo1Test(BaseTest):
|
||||
self.check_cmd_output("aptly repo show -with-packages repo1", "repo1_show")
|
||||
self.check_cmd_output("aptly repo show -with-packages repo2", "repo2_show")
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class MoveRepo2Test(BaseTest):
|
||||
"""
|
||||
move in local repo: simple move w/deps
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo2",
|
||||
@@ -37,14 +36,12 @@ class MoveRepo2Test(BaseTest):
|
||||
self.check_cmd_output("aptly repo show -with-packages repo1", "repo1_show")
|
||||
self.check_cmd_output("aptly repo show -with-packages repo2", "repo2_show")
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class MoveRepo3Test(BaseTest):
|
||||
"""
|
||||
move in local repo: simple move w/deps but w/o archs
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo2",
|
||||
@@ -53,14 +50,12 @@ class MoveRepo3Test(BaseTest):
|
||||
runCmd = "aptly repo move -with-deps repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386"
|
||||
expectedCode = 1
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class MoveRepo4Test(BaseTest):
|
||||
"""
|
||||
move in local repo: dry run
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo2",
|
||||
@@ -73,14 +68,12 @@ class MoveRepo4Test(BaseTest):
|
||||
self.check_cmd_output("aptly repo show -with-packages repo1", "repo1_show")
|
||||
self.check_cmd_output("aptly repo show -with-packages repo2", "repo2_show")
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class MoveRepo5Test(BaseTest):
|
||||
"""
|
||||
move in local repo: wrong dep
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo1",
|
||||
"aptly repo create -comment=Cool -distribution=squeeze repo2",
|
||||
@@ -89,9 +82,6 @@ class MoveRepo5Test(BaseTest):
|
||||
runCmd = "aptly repo move repo1 repo2 'pyspi >> 0.6.1-1.3)'"
|
||||
expectedCode = 1
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class MoveRepo6Test(BaseTest):
|
||||
"""
|
||||
|
||||
@@ -5,6 +5,7 @@ class RemoveRepo1Test(BaseTest):
|
||||
"""
|
||||
remove from local repo: as dep
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze local-repo",
|
||||
"aptly repo add local-repo ${files}"
|
||||
@@ -15,14 +16,12 @@ class RemoveRepo1Test(BaseTest):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly repo show -with-packages local-repo", "repo_show")
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class RemoveRepo2Test(BaseTest):
|
||||
"""
|
||||
remove from local repo: as dep with version, key
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze local-repo",
|
||||
"aptly repo add local-repo ${files}"
|
||||
@@ -33,9 +32,6 @@ class RemoveRepo2Test(BaseTest):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly repo show -with-packages local-repo", "repo_show")
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class RemoveRepo3Test(BaseTest):
|
||||
"""
|
||||
@@ -49,6 +45,7 @@ class RemoveRepo4Test(BaseTest):
|
||||
"""
|
||||
remove from local repo: dry run
|
||||
"""
|
||||
sortOutput = True
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool -distribution=squeeze local-repo",
|
||||
"aptly repo add local-repo ${files}"
|
||||
@@ -58,6 +55,3 @@ class RemoveRepo4Test(BaseTest):
|
||||
def check(self):
|
||||
self.check_output()
|
||||
self.check_cmd_output("aptly repo show -with-packages local-repo", "repo_show")
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
Reference in New Issue
Block a user