mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-07 05:42:42 +00:00
System tests for aptly repo import.
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
Loading packages...
|
||||||
|
[o] nginx_1.2.1-2.2+wheezy2_all imported
|
||||||
|
[o] unpaper_0.4.2-1_amd64 imported
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
Name: repo1
|
||||||
|
Comment: Cool
|
||||||
|
Number of packages: 5
|
||||||
|
Packages:
|
||||||
|
nginx_1.2.1-2.2+wheezy2_all
|
||||||
|
unpaper_0.4.2-1_amd64
|
||||||
|
libboost-program-options-dev_1.49.0.1_i386
|
||||||
|
pyspi_0.6.1-1.3_source
|
||||||
|
pyspi_0.6.1-1.4_source
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
Loading packages...
|
||||||
|
[o] dpkg_1.16.12_i386 imported
|
||||||
|
[o] gcc-4.7-base_4.7.2-5_amd64 imported
|
||||||
|
[o] gcc-4.7-base_4.7.2-5_i386 imported
|
||||||
|
[o] libbz2-1.0_1.0.6-4_i386 imported
|
||||||
|
[o] libc-bin_2.13-38+deb7u1_amd64 imported
|
||||||
|
[o] libc-bin_2.13-38+deb7u1_i386 imported
|
||||||
|
[o] libc6_2.13-38+deb7u1_amd64 imported
|
||||||
|
[o] libc6_2.13-38+deb7u1_i386 imported
|
||||||
|
[o] libgcc1_1:4.7.2-5_amd64 imported
|
||||||
|
[o] libgcc1_1:4.7.2-5_i386 imported
|
||||||
|
[o] liblzma5_5.1.1alpha+20120614-2_i386 imported
|
||||||
|
[o] libselinux1_2.1.9-5_i386 imported
|
||||||
|
[o] multiarch-support_2.13-38+deb7u1_amd64 imported
|
||||||
|
[o] multiarch-support_2.13-38+deb7u1_i386 imported
|
||||||
|
[o] tar_1.26+dfsg-0.1_i386 imported
|
||||||
|
[o] userinfo_2.2-3_amd64 imported
|
||||||
|
[o] zlib1g_1:1.2.7.dfsg-13_i386 imported
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
Name: repo1
|
||||||
|
Comment: Cool
|
||||||
|
Number of packages: 20
|
||||||
|
Packages:
|
||||||
|
gcc-4.7-base_4.7.2-5_amd64
|
||||||
|
libc-bin_2.13-38+deb7u1_amd64
|
||||||
|
libc6_2.13-38+deb7u1_amd64
|
||||||
|
libgcc1_1:4.7.2-5_amd64
|
||||||
|
multiarch-support_2.13-38+deb7u1_amd64
|
||||||
|
userinfo_2.2-3_amd64
|
||||||
|
dpkg_1.16.12_i386
|
||||||
|
gcc-4.7-base_4.7.2-5_i386
|
||||||
|
libboost-program-options-dev_1.49.0.1_i386
|
||||||
|
libbz2-1.0_1.0.6-4_i386
|
||||||
|
libc-bin_2.13-38+deb7u1_i386
|
||||||
|
libc6_2.13-38+deb7u1_i386
|
||||||
|
libgcc1_1:4.7.2-5_i386
|
||||||
|
liblzma5_5.1.1alpha+20120614-2_i386
|
||||||
|
libselinux1_2.1.9-5_i386
|
||||||
|
multiarch-support_2.13-38+deb7u1_i386
|
||||||
|
tar_1.26+dfsg-0.1_i386
|
||||||
|
zlib1g_1:1.2.7.dfsg-13_i386
|
||||||
|
pyspi_0.6.1-1.3_source
|
||||||
|
pyspi_0.6.1-1.4_source
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
ERROR: unable to determine list of architectures, please specify explicitly
|
||||||
|
Loading packages...
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
Changes not saved, as dry run has been requested.
|
||||||
|
Loading packages...
|
||||||
|
[o] redeclipse-dbg_1.2-3_amd64 imported
|
||||||
|
[o] redeclipse-dbg_1.2-3_i386 imported
|
||||||
|
[o] redeclipse_1.2-3_amd64 imported
|
||||||
|
[o] redeclipse_1.2-3_i386 imported
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
Name: repo1
|
||||||
|
Comment: Cool
|
||||||
|
Number of packages: 0
|
||||||
|
Packages:
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
Loading packages...
|
||||||
|
ERROR: unable to import: unable to parse dependency: pyspi >> 0.6.1-1.3)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ERROR: unable to import: mirror not updated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ERROR: unable to import: local repo with name repo1 not found
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ERROR: unable to import: mirror with name wheezy-main not found
|
||||||
@@ -6,6 +6,7 @@ from .add import *
|
|||||||
from .copy import *
|
from .copy import *
|
||||||
from .create import *
|
from .create import *
|
||||||
from .drop import *
|
from .drop import *
|
||||||
|
from .cmdimport import *
|
||||||
from .list import *
|
from .list import *
|
||||||
from .move import *
|
from .move import *
|
||||||
from .remove import *
|
from .remove import *
|
||||||
|
|||||||
@@ -0,0 +1,118 @@
|
|||||||
|
from lib import BaseTest
|
||||||
|
|
||||||
|
|
||||||
|
class ImportRepo1Test(BaseTest):
|
||||||
|
"""
|
||||||
|
import to local repo: simple import
|
||||||
|
"""
|
||||||
|
fixtureDB = True
|
||||||
|
fixtureCmds = [
|
||||||
|
"aptly repo create -comment=Cool repo1",
|
||||||
|
"aptly repo add repo1 ${files}"
|
||||||
|
]
|
||||||
|
runCmd = "aptly repo import wheezy-main repo1 nginx unpaper_0.4.2-1_amd64"
|
||||||
|
|
||||||
|
def check(self):
|
||||||
|
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
|
||||||
|
"""
|
||||||
|
fixtureDB = True
|
||||||
|
fixtureCmds = [
|
||||||
|
"aptly repo create -comment=Cool repo1",
|
||||||
|
"aptly repo add repo1 ${files}"
|
||||||
|
]
|
||||||
|
runCmd = "aptly -architectures=i386,amd64 repo import -with-deps wheezy-main repo1 dpkg_1.16.12_i386 userinfo_2.2-3_amd64"
|
||||||
|
|
||||||
|
def check(self):
|
||||||
|
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
|
||||||
|
"""
|
||||||
|
fixtureDB = True
|
||||||
|
fixtureCmds = [
|
||||||
|
"aptly repo create -comment=Cool repo1",
|
||||||
|
]
|
||||||
|
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
|
||||||
|
"""
|
||||||
|
fixtureDB = True
|
||||||
|
fixtureCmds = [
|
||||||
|
"aptly repo create -comment=Cool repo1",
|
||||||
|
]
|
||||||
|
runCmd = "aptly -architectures=i386,amd64 repo import -dry-run -with-deps wheezy-contrib repo1 redeclipse-dbg"
|
||||||
|
|
||||||
|
def check(self):
|
||||||
|
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
|
||||||
|
"""
|
||||||
|
fixtureDB = True
|
||||||
|
fixtureCmds = [
|
||||||
|
"aptly repo create -comment=Cool repo1",
|
||||||
|
]
|
||||||
|
runCmd = "aptly repo import wheezy-contrib repo1 'pyspi >> 0.6.1-1.3)'"
|
||||||
|
expectedCode = 1
|
||||||
|
|
||||||
|
|
||||||
|
class ImportRepo6Test(BaseTest):
|
||||||
|
"""
|
||||||
|
import to local repo: non-updated mirror
|
||||||
|
"""
|
||||||
|
fixtureCmds = [
|
||||||
|
"aptly repo create -comment=Cool repo1",
|
||||||
|
"aptly mirror create --ignore-signatures mirror1 http://mirror.yandex.ru/debian/ wheezy",
|
||||||
|
]
|
||||||
|
runCmd = "aptly repo import mirror1 repo1 nginx"
|
||||||
|
expectedCode = 1
|
||||||
|
|
||||||
|
|
||||||
|
class ImportRepo7Test(BaseTest):
|
||||||
|
"""
|
||||||
|
import to local repo: no dst
|
||||||
|
"""
|
||||||
|
fixtureDB = True
|
||||||
|
fixtureCmds = [
|
||||||
|
]
|
||||||
|
runCmd = "aptly repo import wheezy-contrib repo1 nginx"
|
||||||
|
expectedCode = 1
|
||||||
|
|
||||||
|
|
||||||
|
class ImportRepo8Test(BaseTest):
|
||||||
|
"""
|
||||||
|
import to local repo: no src
|
||||||
|
"""
|
||||||
|
fixtureCmds = [
|
||||||
|
"aptly repo create -comment=Cool repo1",
|
||||||
|
]
|
||||||
|
runCmd = "aptly repo import wheezy-main repo1 pyspi"
|
||||||
|
expectedCode = 1
|
||||||
Reference in New Issue
Block a user