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

Side by Side Diff: appengine/swarming/handlers_endpoints_test.py

Issue 2836463002: Include Machine Provider machine_type in swarming_rpcs.BotInfo (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | appengine/swarming/message_conversion.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 # coding=utf-8 2 # coding=utf-8
3 # Copyright 2015 The LUCI Authors. All rights reserved. 3 # Copyright 2015 The LUCI Authors. All rights reserved.
4 # Use of this source code is governed under the Apache License, Version 2.0 4 # Use of this source code is governed under the Apache License, Version 2.0
5 # that can be found in the LICENSE file. 5 # that can be found in the LICENSE file.
6 6
7 import base64 7 import base64
8 import datetime 8 import datetime
9 import json 9 import json
10 import logging 10 import logging
(...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after
1670 u'bot_id': u'id3', 1670 u'bot_id': u'id3',
1671 u'deleted': False, 1671 u'deleted': False,
1672 u'dimensions': [ 1672 u'dimensions': [
1673 {u'key': u'foo', u'value': [u'bar']}, 1673 {u'key': u'foo', u'value': [u'bar']},
1674 {u'key': u'id', u'value': [u'id3']}, 1674 {u'key': u'id', u'value': [u'id3']},
1675 ], 1675 ],
1676 u'external_ip': u'8.8.4.4', 1676 u'external_ip': u'8.8.4.4',
1677 u'first_seen_ts': then_str, 1677 u'first_seen_ts': then_str,
1678 u'is_dead': True, 1678 u'is_dead': True,
1679 u'last_seen_ts': then_str, 1679 u'last_seen_ts': then_str,
1680 u'machine_type': u'mt',
1680 u'quarantined': False, 1681 u'quarantined': False,
1681 u'state': u'{"ram":65}', 1682 u'state': u'{"ram":65}',
1682 u'version': u'123456789', 1683 u'version': u'123456789',
1683 } 1684 }
1684 expected = { 1685 expected = {
1685 u'items': [bot1, bot2, bot3], 1686 u'items': [bot1, bot2, bot3],
1686 u'death_timeout': unicode(config.settings().bot_death_timeout_secs), 1687 u'death_timeout': unicode(config.settings().bot_death_timeout_secs),
1687 u'now': unicode(now.strftime(self.DATETIME_FORMAT)), 1688 u'now': unicode(now.strftime(self.DATETIME_FORMAT)),
1688 } 1689 }
1689 # All bots should be returned with no params 1690 # All bots should be returned with no params
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 self.call_api('terminate', body={'bot_id': 'bot1'}, status=403) 2185 self.call_api('terminate', body={'bot_id': 'bot1'}, status=403)
2185 2186
2186 2187
2187 if __name__ == '__main__': 2188 if __name__ == '__main__':
2188 if '-v' in sys.argv: 2189 if '-v' in sys.argv:
2189 unittest.TestCase.maxDiff = None 2190 unittest.TestCase.maxDiff = None
2190 logging.basicConfig(level=logging.DEBUG) 2191 logging.basicConfig(level=logging.DEBUG)
2191 else: 2192 else:
2192 logging.basicConfig(level=logging.CRITICAL) 2193 logging.basicConfig(level=logging.CRITICAL)
2193 unittest.main() 2194 unittest.main()
OLDNEW
« no previous file with comments | « no previous file | appengine/swarming/message_conversion.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698