aptly exits with 2 on command/flag parse error. #52

This commit is contained in:
Andrey Smirnov
2014-05-16 00:22:51 +04:00
parent 2cbb486f6b
commit 05a42f4cba
40 changed files with 104 additions and 32 deletions
+1
View File
@@ -21,3 +21,4 @@ Options:
-dep-follow-recommends=false: when processing dependencies, follow Recommends
-dep-follow-source=false: when processing dependencies, follow from binary to Source packages
-dep-follow-suggests=false: when processing dependencies, follow Suggests
ERROR: unable to parse command
+1
View File
@@ -13,3 +13,4 @@ Options:
-ignore-signatures=false: disable verification of Release file signatures
-keyring=: gpg keyring to use when verifying Release file (could be specified multiple times)
-with-sources=false: download source packages in addition to binary packages
ERROR: unable to parse command
+1
View File
@@ -18,3 +18,4 @@ Options:
-dep-follow-recommends=false: when processing dependencies, follow Recommends
-dep-follow-source=false: when processing dependencies, follow from binary to Source packages
-dep-follow-suggests=false: when processing dependencies, follow Suggests
ERROR: unable to parse command
+17
View File
@@ -0,0 +1,17 @@
flag provided but not defined: -fxz
Usage: aptly mirror create <name> <archive url> <distribution> [<component1> ...]
aptly mirror create - create new mirror
Options:
-architectures="": list of architectures to consider during (comma-separated), default to all available
-config="": location of configuration file (default locations are /etc/aptly.conf, ~/.aptly.conf)
-dep-follow-all-variants=false: when processing dependencies, follow a & b if depdency is 'a|b'
-dep-follow-recommends=false: when processing dependencies, follow Recommends
-dep-follow-source=false: when processing dependencies, follow from binary to Source packages
-dep-follow-suggests=false: when processing dependencies, follow Suggests
-ignore-signatures=false: disable verification of Release file signatures
-keyring=: gpg keyring to use when verifying Release file (could be specified multiple times)
-with-sources=false: download source packages in addition to binary packages
ERROR: unable to parse flags
+11
View File
@@ -10,6 +10,7 @@ class MainTest(BaseTest):
"""
main
"""
expectedCode = 2
runCmd = "aptly"
outputMatchPrepare = lambda _, s: re.sub(r' -(cpuprofile|memprofile|memstats|meminterval)=.*\n', '', s, flags=re.MULTILINE)
@@ -19,6 +20,7 @@ class MirrorTest(BaseTest):
"""
main
"""
expectedCode = 2
runCmd = "aptly mirror"
@@ -26,6 +28,7 @@ class MirrorCreateTest(BaseTest):
"""
main
"""
expectedCode = 2
runCmd = "aptly mirror create"
@@ -50,3 +53,11 @@ class MirrorCreateHelpTest(BaseTest):
main
"""
runCmd = "aptly help mirror create"
class WrongFlagTest(BaseTest):
"""
main
"""
expectedCode = 2
runCmd = "aptly mirror create -fxz=sss"