Add more system tests. #96

This commit is contained in:
Andrey Smirnov
2014-08-25 22:15:21 +04:00
parent 099a82c816
commit 6003764ff5
7 changed files with 98 additions and 6 deletions

View File

@@ -12,15 +12,15 @@ Local repo [local] successfully added.
You can run 'aptly repo add local ...' to add packages to repository.
End command output: ------------------------------
Local repo `local` has been removed.
3) [Running]: repo drop local
Begin command output: ----------------------------
Local repo `local` has been removed.
End command output: ------------------------------
aptly version: 0.8~dev
4) [Running]: version
Begin command output: ----------------------------
aptly version: 0.8~dev
End command output: ------------------------------

View File

@@ -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: ------------------------------

View File

@@ -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

View File

@@ -0,0 +1,3 @@
repo list
repo create -distribution="Cool" abc
repo show abc

View File

@@ -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: ------------------------------

View File

@@ -0,0 +1,2 @@
ERROR: No such file, not_found

View File

@@ -2,8 +2,37 @@ from lib import 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"