Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(654)

Side by Side Diff: appengine/findit/model/test/wf_swarming_task_test.py

Issue 2508603002: [Findit] Refactoring trigger swarming task pipelines (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | appengine/findit/model/wf_swarming_task.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import unittest 5 import unittest
6 6
7 from model.wf_swarming_task import WfSwarmingTask 7 from model.wf_swarming_task import WfSwarmingTask
8 8
9 9
10 class WfSwarmingTaskTest(unittest.TestCase): 10 class WfSwarmingTaskTest(unittest.TestCase):
11
11 def testClassifiedTests(self): 12 def testClassifiedTests(self):
12 task = WfSwarmingTask.Create('m', 'b', 121, 'browser_tests') 13 task = WfSwarmingTask.Create('m', 'b', 121, 'browser_tests')
13 task.tests_statuses = { 14 task.tests_statuses = {
14 'TestSuite1.test1': { 15 'TestSuite1.test1': {
15 'total_run': 2, 16 'total_run': 2,
16 'SUCCESS': 2 17 'SUCCESS': 2
17 }, 18 },
18 'TestSuite1.test2': { 19 'TestSuite1.test2': {
19 'total_run': 4, 20 'total_run': 4,
20 'SUCCESS': 2, 21 'SUCCESS': 2,
21 'FAILURE': 2 22 'FAILURE': 2
22 }, 23 },
(...skipping 13 matching lines...) Expand all
36 37
37 expected_classified_tests = { 38 expected_classified_tests = {
38 'flaky_tests': ['TestSuite1.test2', 'TestSuite1.test1'], 39 'flaky_tests': ['TestSuite1.test2', 'TestSuite1.test1'],
39 'reliable_tests': ['TestSuite1.test3', 'TestSuite1.test4'], 40 'reliable_tests': ['TestSuite1.test3', 'TestSuite1.test4'],
40 'unknown_tests': ['TestSuite1.test5'] 41 'unknown_tests': ['TestSuite1.test5']
41 } 42 }
42 43
43 self.assertEqual(expected_classified_tests, task.classified_tests) 44 self.assertEqual(expected_classified_tests, task.classified_tests)
44 self.assertEqual(expected_classified_tests['reliable_tests'], 45 self.assertEqual(expected_classified_tests['reliable_tests'],
45 task.reliable_tests) 46 task.reliable_tests)
47
48 def testStepName(self):
49 master_name = 'm'
50 builder_name = 'b'
51 build_number = 123
52 expected_step_name = 's'
53 task = WfSwarmingTask.Create(
54 master_name, builder_name, build_number, expected_step_name)
55 self.assertEqual(expected_step_name, task.step_name)
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/model/wf_swarming_task.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698