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

Unified Diff: infra/libs/event_mon/test/router_test.py

Issue 1157383006: Removed infra/libs/event_mon (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « infra/libs/event_mon/test/monitoring_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/libs/event_mon/test/router_test.py
diff --git a/infra/libs/event_mon/test/router_test.py b/infra/libs/event_mon/test/router_test.py
deleted file mode 100644
index f55d49c5353be2f2c612ee70ebe827622a0ac2e5..0000000000000000000000000000000000000000
--- a/infra/libs/event_mon/test/router_test.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import unittest
-
-from infra.libs.event_mon import router
-from infra.libs.event_mon.log_request_lite_pb2 import LogRequestLite
-
-
-DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data')
-
-
-class RouterTests(unittest.TestCase):
- def test_smoke(self):
- # Use dry_run to avoid code that deals with http (including auth).
- r = router._Router({}, endpoint=None)
- self.assertTrue(r.close())
-
- def test_smoke_with_credentials(self):
- cache = {'service_account_creds':
- os.path.join(DATA_DIR, 'valid_creds.json'),
- 'service_accounts_creds_root': 'whatever.the/other/is/absolute'}
- r = router._Router(cache, endpoint='https://any.where')
- self.assertTrue(r.close())
-
- def test_push_smoke(self):
- r = router._Router({}, endpoint=None)
-
- req = LogRequestLite.LogEventLite()
- req.event_time_ms = router.time_ms()
- req.event_code = 1
- req.event_flow_id = 2
- r.push_event(req)
- self.assertTrue(r.close())
-
- def test_push_error_handling(self):
- r = router._Router({}, endpoint=None)
- r.push_event(None)
- self.assertTrue(r.close())
« no previous file with comments | « infra/libs/event_mon/test/monitoring_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698