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

Side by Side Diff: dashboard/dashboard/benchmark_health_report_test.py

Issue 2707263008: benchmark_health_report: Query anomalies by benchmark/master. (Closed)
Patch Set: fix test Created 3 years, 10 months 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 | « dashboard/dashboard/benchmark_health_report.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2017 The Chromium Authors. All rights reserved. 1 # Copyright 2017 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 datetime 5 import datetime
6 import unittest 6 import unittest
7 7
8 import webapp2 8 import webapp2
9 import webtest 9 import webtest
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 self.assertItemsEqual(bots, ['linux']) 119 self.assertItemsEqual(bots, ['linux'])
120 self.assertTrue(self.GetJsonValue(response, 'monitored')) 120 self.assertTrue(self.GetJsonValue(response, 'monitored'))
121 alerts = self.GetJsonValue(response, 'alerts') 121 alerts = self.GetJsonValue(response, 'alerts')
122 self.assertEqual(3, len(alerts)) 122 self.assertEqual(3, len(alerts))
123 123
124 def testPost_Benchmark_NotMonitored(self): 124 def testPost_Benchmark_NotMonitored(self):
125 self._AddCachedSuites() 125 self._AddCachedSuites()
126 self._AddTests() 126 self._AddTests()
127 response = self.testapp.post( 127 response = self.testapp.post(
128 '/benchmark_health_report', { 128 '/benchmark_health_report', {
129 'benchmark': 'page_cycler', 129 'benchmark': 'speedometer',
sullivan 2017/02/23 03:32:25 The previous code was able to figure out that sinc
130 'num_days': '30', 130 'num_days': '30',
131 'master': 'ChromiumPerf', 131 'master': 'ChromiumPerf',
132 }) 132 })
133 self.assertFalse(self.GetJsonValue(response, 'monitored')) 133 self.assertFalse(self.GetJsonValue(response, 'monitored'))
134 134
135 def testPost_BenchmarkArgumentNumDaysArgument_ListsCorrectAlerts(self): 135 def testPost_BenchmarkArgumentNumDaysArgument_ListsCorrectAlerts(self):
136 self._AddCachedSuites() 136 self._AddCachedSuites()
137 self._AddSheriff(['*/*/page_cycler/*', '*/*/page_cycler/*/*']) 137 self._AddSheriff(['*/*/page_cycler/*', '*/*/page_cycler/*/*'])
138 self._AddTests() 138 self._AddTests()
139 self._AddAnomalyEntities( 139 self._AddAnomalyEntities(
(...skipping 13 matching lines...) Expand all
153 {'benchmark': 'page_cycler', 'num_days': '5', 'master': 'ChromiumPerf'}) 153 {'benchmark': 'page_cycler', 'num_days': '5', 'master': 'ChromiumPerf'})
154 bots = self.GetJsonValue(response, 'bots') 154 bots = self.GetJsonValue(response, 'bots')
155 self.assertItemsEqual(bots, ['linux']) 155 self.assertItemsEqual(bots, ['linux'])
156 self.assertTrue(self.GetJsonValue(response, 'monitored')) 156 self.assertTrue(self.GetJsonValue(response, 'monitored'))
157 alerts = self.GetJsonValue(response, 'alerts') 157 alerts = self.GetJsonValue(response, 'alerts')
158 self.assertEqual(2, len(alerts)) 158 self.assertEqual(2, len(alerts))
159 159
160 160
161 if __name__ == '__main__': 161 if __name__ == '__main__':
162 unittest.main() 162 unittest.main()
OLDNEW
« no previous file with comments | « dashboard/dashboard/benchmark_health_report.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698