mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-11 03:11:50 +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.
|
||||
|
||||
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: ------------------------------
|
||||
|
||||
22
system/t10_task/RunTask2Test_gold
Normal file
22
system/t10_task/RunTask2Test_gold
Normal 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: ------------------------------
|
||||
10
system/t10_task/RunTask3Test_gold
Normal file
10
system/t10_task/RunTask3Test_gold
Normal 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
|
||||
|
||||
3
system/t10_task/RunTask4Test/task
Normal file
3
system/t10_task/RunTask4Test/task
Normal file
@@ -0,0 +1,3 @@
|
||||
repo list
|
||||
repo create -distribution="Cool" abc
|
||||
repo show abc
|
||||
26
system/t10_task/RunTask4Test_gold
Normal file
26
system/t10_task/RunTask4Test_gold
Normal 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: ------------------------------
|
||||
2
system/t10_task/RunTask5Test_gold
Normal file
2
system/t10_task/RunTask5Test_gold
Normal file
@@ -0,0 +1,2 @@
|
||||
ERROR: No such file, not_found
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user