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

Side by Side Diff: appengine/swarming/server/task_result_test.py

Issue 2012843003: Remove use of search API; effectively remove support to search for task by name. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: . Created 4 years, 7 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 | « appengine/swarming/server/task_result.py ('k') | appengine/swarming/server/task_scheduler.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The LUCI Authors. All rights reserved. 2 # Copyright 2014 The LUCI Authors. All rights reserved.
3 # Use of this source code is governed under the Apache License, Version 2.0 3 # Use of this source code is governed under the Apache License, Version 2.0
4 # that can be found in the LICENSE file. 4 # that can be found in the LICENSE file.
5 5
6 import datetime 6 import datetime
7 import logging 7 import logging
8 import os 8 import os
9 import random 9 import random
10 import sys 10 import sys
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 ndb.transaction(lambda: ndb.put_multi((run_result, result_summary))) 511 ndb.transaction(lambda: ndb.put_multi((run_result, result_summary)))
512 run_result = run_result.key.get() 512 run_result = run_result.key.get()
513 result_summary = result_summary.key.get() 513 result_summary = result_summary.key.get()
514 self.assertEqual(True, run_result.failure) 514 self.assertEqual(True, run_result.failure)
515 self.assertEqual(True, result_summary.failure) 515 self.assertEqual(True, result_summary.failure)
516 516
517 def test_performance_stats_pre_put_hook(self): 517 def test_performance_stats_pre_put_hook(self):
518 with self.assertRaises(datastore_errors.BadValueError): 518 with self.assertRaises(datastore_errors.BadValueError):
519 task_result.PerformanceStats().put() 519 task_result.PerformanceStats().put()
520 520
521 def test_get_tasks(self):
522 # Indirectly tested by both frontend and API.
523 pass
524
525 def test_get_result_summaries_query(self): 521 def test_get_result_summaries_query(self):
526 # Indirectly tested by API. 522 # Indirectly tested by API.
527 pass 523 pass
528 524
529 def test_get_run_results_query(self): 525 def test_get_run_results_query(self):
530 # Indirectly tested by API. 526 # Indirectly tested by API.
531 pass 527 pass
532 528
533 529
534 class TestOutput(TestCase): 530 class TestOutput(TestCase):
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 task_result.TaskOutput.CHUNK_SIZE * '\x00' + 'Baz\x00Bar\x00FooWow', 675 task_result.TaskOutput.CHUNK_SIZE * '\x00' + 'Baz\x00Bar\x00FooWow',
680 self.run_result.get_output()) 676 self.run_result.get_output())
681 self.assertTaskOutputChunk( 677 self.assertTaskOutputChunk(
682 [{'chunk': 'Baz\x00Bar\x00FooWow', 'gaps': [3, 4, 7, 8]}]) 678 [{'chunk': 'Baz\x00Bar\x00FooWow', 'gaps': [3, 4, 7, 8]}])
683 679
684 680
685 if __name__ == '__main__': 681 if __name__ == '__main__':
686 if '-v' in sys.argv: 682 if '-v' in sys.argv:
687 unittest.TestCase.maxDiff = None 683 unittest.TestCase.maxDiff = None
688 unittest.main() 684 unittest.main()
OLDNEW
« no previous file with comments | « appengine/swarming/server/task_result.py ('k') | appengine/swarming/server/task_scheduler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698