mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-16 12:08:04 +00:00
Add more system tests. #96
This commit is contained in:
@@ -12,15 +12,15 @@ Local repo [local] successfully added.
|
|||||||
You can run 'aptly repo add local ...' to add packages to repository.
|
You can run 'aptly repo add local ...' to add packages to repository.
|
||||||
|
|
||||||
End command output: ------------------------------
|
End command output: ------------------------------
|
||||||
Local repo `local` has been removed.
|
|
||||||
3) [Running]: repo drop local
|
3) [Running]: repo drop local
|
||||||
|
|
||||||
Begin command output: ----------------------------
|
Begin command output: ----------------------------
|
||||||
|
Local repo `local` has been removed.
|
||||||
|
|
||||||
End command output: ------------------------------
|
End command output: ------------------------------
|
||||||
aptly version: 0.8~dev
|
|
||||||
4) [Running]: version
|
4) [Running]: version
|
||||||
|
|
||||||
Begin command output: ----------------------------
|
Begin command output: ----------------------------
|
||||||
|
aptly version: 0.8~dev
|
||||||
|
|
||||||
End command output: ------------------------------
|
End command output: ------------------------------
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
1) [Running]: repo list -raw
|
||||||
|
|
||||||
|
Begin command output: ----------------------------
|
||||||
|
|
||||||
|
End command output: ------------------------------
|
||||||
|
2) [Running]: repo create local
|
||||||
|
|
||||||
|
Begin command output: ----------------------------
|
||||||
|
|
||||||
|
Local repo [local] successfully added.
|
||||||
|
You can run 'aptly repo add local ...' to add packages to repository.
|
||||||
|
|
||||||
|
End command output: ------------------------------
|
||||||
|
3) [Running]: repo list
|
||||||
|
|
||||||
|
Begin command output: ----------------------------
|
||||||
|
List of local repos:
|
||||||
|
* [local] (packages: 0)
|
||||||
|
|
||||||
|
To get more information about local repository, run `aptly repo show <name>`.
|
||||||
|
|
||||||
|
End command output: ------------------------------
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
1) [Running]: repo show a
|
||||||
|
|
||||||
|
Begin command output: ----------------------------
|
||||||
|
ERROR: unable to show: local repo with name a not found
|
||||||
|
|
||||||
|
End command output: ------------------------------
|
||||||
|
2) [Skipping]: repo create local
|
||||||
|
3) [Skipping]: repo list
|
||||||
|
ERROR: At least one command has reported an error
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
repo list
|
||||||
|
repo create -distribution="Cool" abc
|
||||||
|
repo show abc
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
Reading file...
|
||||||
|
|
||||||
|
1) [Running]: repo list
|
||||||
|
|
||||||
|
Begin command output: ----------------------------
|
||||||
|
No local repositories found, create one with `aptly repo create ...`.
|
||||||
|
|
||||||
|
End command output: ------------------------------
|
||||||
|
2) [Running]: repo create -distribution=Cool abc
|
||||||
|
|
||||||
|
Begin command output: ----------------------------
|
||||||
|
|
||||||
|
Local repo [abc] successfully added.
|
||||||
|
You can run 'aptly repo add abc ...' to add packages to repository.
|
||||||
|
|
||||||
|
End command output: ------------------------------
|
||||||
|
3) [Running]: repo show abc
|
||||||
|
|
||||||
|
Begin command output: ----------------------------
|
||||||
|
Name: abc
|
||||||
|
Comment:
|
||||||
|
Default Distribution: Cool
|
||||||
|
Default Component: main
|
||||||
|
Number of packages: 0
|
||||||
|
|
||||||
|
End command output: ------------------------------
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
ERROR: No such file, not_found
|
||||||
|
|
||||||
+33
-4
@@ -2,8 +2,37 @@ from lib import BaseTest
|
|||||||
|
|
||||||
|
|
||||||
class RunTask1Test(BaseTest):
|
class RunTask1Test(BaseTest):
|
||||||
"""
|
"""
|
||||||
output should match
|
task run: simple commands, 1-word command
|
||||||
"""
|
"""
|
||||||
|
runCmd = "aptly task run repo list, repo create local, repo drop local, version"
|
||||||
|
|
||||||
runCmd = "aptly task run repo list, repo create local, repo drop local, version"
|
|
||||||
|
class RunTask2Test(BaseTest):
|
||||||
|
"""
|
||||||
|
task run: commands with args
|
||||||
|
"""
|
||||||
|
runCmd = "aptly task run -- repo list -raw, repo create local, repo list"
|
||||||
|
|
||||||
|
|
||||||
|
class RunTask3Test(BaseTest):
|
||||||
|
"""
|
||||||
|
task run: failure
|
||||||
|
"""
|
||||||
|
expectedCode = 1
|
||||||
|
runCmd = "aptly task run -- repo show a, repo create local, repo list"
|
||||||
|
|
||||||
|
|
||||||
|
class RunTask4Test(BaseTest):
|
||||||
|
"""
|
||||||
|
task run: from file
|
||||||
|
"""
|
||||||
|
runCmd = "aptly task run -filename=${testfiles}/task"
|
||||||
|
|
||||||
|
|
||||||
|
class RunTask5Test(BaseTest):
|
||||||
|
"""
|
||||||
|
task run: from file not found
|
||||||
|
"""
|
||||||
|
expectedCode = 1
|
||||||
|
runCmd = "aptly task run -filename=not_found"
|
||||||
|
|||||||
Reference in New Issue
Block a user