You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by dm...@apache.org on 2014/10/06 20:20:12 UTC
git commit: Test all the nouns and verbs within the Aurora Command
Line for help output.
Repository: incubator-aurora
Updated Branches:
refs/heads/master aad9a5a18 -> 341f4e560
Test all the nouns and verbs within the Aurora Command Line for help output.
Bugs closed: AURORA-748
Reviewed at https://reviews.apache.org/r/26372/
Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/341f4e56
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/341f4e56
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/341f4e56
Branch: refs/heads/master
Commit: 341f4e560e63e0a38f23730abf4ab2acef2a63e6
Parents: aad9a5a
Author: Joe Smith <ya...@gmail.com>
Authored: Mon Oct 6 11:19:51 2014 -0700
Committer: David McLaughlin <dm...@twitter.com>
Committed: Mon Oct 6 11:19:51 2014 -0700
----------------------------------------------------------------------
src/main/python/apache/aurora/client/cli/update.py | 4 ++++
src/test/python/apache/aurora/client/cli/test_help.py | 14 ++++++++++++++
2 files changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/341f4e56/src/main/python/apache/aurora/client/cli/update.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/update.py b/src/main/python/apache/aurora/client/cli/update.py
index b4dd792..41475a7 100644
--- a/src/main/python/apache/aurora/client/cli/update.py
+++ b/src/main/python/apache/aurora/client/cli/update.py
@@ -42,6 +42,7 @@ class StartUpdate(Verb):
INSTANCES_SPEC_ARGUMENT, CONFIG_ARGUMENT
]
+ @property
def help(self):
return textwrap.dedent("""\
Start a scheduler-driven rolling upgrade on a running job, using the update
@@ -81,6 +82,7 @@ class PauseUpdate(Verb):
JOBSPEC_ARGUMENT
]
+ @property
def help(self):
return """Pause a scheduler-driven rolling update."""
@@ -104,6 +106,7 @@ class ResumeUpdate(Verb):
JOBSPEC_ARGUMENT
]
+ @property
def help(self):
return """Resume a paused scheduler-driven rolling update."""
@@ -127,6 +130,7 @@ class AbortUpdate(Verb):
JOBSPEC_ARGUMENT
]
+ @property
def help(self):
return """Abort an in-pregress scheduler-driven rolling update."""
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/341f4e56/src/test/python/apache/aurora/client/cli/test_help.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_help.py b/src/test/python/apache/aurora/client/cli/test_help.py
index e1602b1..f73c8a3 100644
--- a/src/test/python/apache/aurora/client/cli/test_help.py
+++ b/src/test/python/apache/aurora/client/cli/test_help.py
@@ -37,6 +37,20 @@ class TestHelp(unittest.TestCase):
for str in str.split('\n'):
self.err_transcript.append(str)
+ def test_all_help(self):
+ for noun in self.cmd.registered_nouns:
+ with patch('apache.aurora.client.cli.client.AuroraCommandLine.print_out',
+ side_effect=self.mock_print):
+ self.cmd.execute(['help', noun])
+ assert 'Usage for noun "%s":' % noun in self.transcript
+ assert self.err_transcript == []
+ self.transcript = []
+ for verb in self.cmd.nouns.get(noun).verbs.keys():
+ self.cmd.execute(['help', noun, verb])
+ assert 'Usage for verb "%s %s":' % (noun, verb) in self.transcript
+ assert self.err_transcript == []
+ self.transcript = []
+
def test_help(self):
with patch('apache.aurora.client.cli.client.AuroraCommandLine.print_out',
side_effect=self.mock_print):