Bug 1275774 - Add tests for new taskcluster try flag parsing r=dustin
authorBrian Stack <bstack@mozilla.com>
Wed, 28 Sep 2016 09:34:42 -0700
changeset 358396 afffe391d02640ed433ca5ca67ce7a35b9c45a66
parent 358395 229984f2cc9379b3560787ab1f518a2066a80bec
child 358397 e809e1f8304bc3e76ee5f9cdf4691a0d24b35e29
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-beta@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1275774
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1275774 - Add tests for new taskcluster try flag parsing r=dustin MozReview-Commit-ID: 1QKnLZE0hzU
taskcluster/taskgraph/test/test_try_option_syntax.py
--- a/taskcluster/taskgraph/test/test_try_option_syntax.py
+++ b/taskcluster/taskgraph/test/test_try_option_syntax.py
@@ -250,10 +250,25 @@ class TestTryOptionSyntax(unittest.TestC
         tos = TryOptionSyntax('try: --rebuild 10', empty_graph)
         self.assertEqual(tos.trigger_tests, 10)
 
     def test_interactive(self):
         "--interactive sets interactive"
         tos = TryOptionSyntax('try: --interactive', empty_graph)
         self.assertEqual(tos.interactive, True)
 
+    def test_all_email(self):
+        "--all-emails sets notifications"
+        tos = TryOptionSyntax('try: --all-emails', empty_graph)
+        self.assertEqual(tos.notifications, 'all')
+
+    def test_fail_email(self):
+        "--failure-emails sets notifications"
+        tos = TryOptionSyntax('try: --failure-emails', empty_graph)
+        self.assertEqual(tos.notifications, 'failure')
+
+    def test_no_email(self):
+        "no email settings don't set notifications"
+        tos = TryOptionSyntax('try:', empty_graph)
+        self.assertEqual(tos.notifications, None)
+
 if __name__ == '__main__':
     main()