mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-07 22:20:24 +00:00
System tests for aptly repo remove.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
|
||||
Loading packages...
|
||||
[-] pyspi_0.6.1-1.3_source removed
|
||||
[-] pyspi_0.6.1-1.4_source removed
|
||||
@@ -0,0 +1,5 @@
|
||||
Name: local-repo
|
||||
Comment: Cool
|
||||
Number of packages: 1
|
||||
Packages:
|
||||
libboost-program-options-dev_1.49.0.1_i386
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
Loading packages...
|
||||
[-] libboost-program-options-dev_1.49.0.1_i386 removed
|
||||
[-] pyspi_0.6.1-1.4_source removed
|
||||
@@ -0,0 +1,5 @@
|
||||
Name: local-repo
|
||||
Comment: Cool
|
||||
Number of packages: 1
|
||||
Packages:
|
||||
pyspi_0.6.1-1.3_source
|
||||
@@ -0,0 +1 @@
|
||||
ERROR: unable to remove: local repo with name local-repo not found
|
||||
@@ -5,5 +5,6 @@ Testing local repo management
|
||||
from .add import *
|
||||
from .create import *
|
||||
from .drop import *
|
||||
from .show import *
|
||||
from .list import *
|
||||
from .remove import *
|
||||
from .show import *
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
from lib import BaseTest
|
||||
|
||||
|
||||
class RemoveRepo1Test(BaseTest):
|
||||
"""
|
||||
remvoe from local repo: as dep
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool local-repo",
|
||||
"aptly repo add local-repo ${files}"
|
||||
]
|
||||
runCmd = "aptly repo remove local-repo pyspi some"
|
||||
|
||||
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")))
|
||||
|
||||
|
||||
class RemoveRepo2Test(BaseTest):
|
||||
"""
|
||||
remvoe from local repo: as dep with version, key
|
||||
"""
|
||||
fixtureCmds = [
|
||||
"aptly repo create -comment=Cool local-repo",
|
||||
"aptly repo add local-repo ${files}"
|
||||
]
|
||||
runCmd = "aptly repo remove local-repo 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386"
|
||||
|
||||
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")))
|
||||
|
||||
|
||||
class RemoveRepo3Test(BaseTest):
|
||||
"""
|
||||
remvoe from local repo: no such repo
|
||||
"""
|
||||
runCmd = "aptly repo remove local-repo 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386"
|
||||
expectedCode = 1
|
||||
Reference in New Issue
Block a user