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

Unified Diff: infra/services/service_manager/test/config_watcher_test.py

Issue 1365583002: Have service_manager start a cloudtail attached to each service it starts. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Just use the default project ID Created 5 years, 3 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
Index: infra/services/service_manager/test/config_watcher_test.py
diff --git a/infra/services/service_manager/test/config_watcher_test.py b/infra/services/service_manager/test/config_watcher_test.py
index ee48707de53e11e236de1e8c076031ad4da6867d..8f320104b5c6b5c23c55bf4ad7435a48646179fc 100644
--- a/infra/services/service_manager/test/config_watcher_test.py
+++ b/infra/services/service_manager/test/config_watcher_test.py
@@ -36,6 +36,7 @@ class ConfigWatcherTest(unittest.TestCase):
43,
'/state',
'/rootdir',
+ '/cloudtail',
sleep_fn=self.mock_sleep)
def tearDown(self):
@@ -70,7 +71,8 @@ class ConfigWatcherTest(unittest.TestCase):
self.cw._iteration()
- self.mock_thread_ctor.assert_called_once_with(43, '/state', {'name': 'foo'})
+ self.mock_thread_ctor.assert_called_once_with(
+ 43, '/state', {'name': 'foo'}, '/cloudtail')
self.mock_thread.start.assert_called_once_with()
self.mock_thread.start_service.assert_called_once_with()
@@ -86,7 +88,8 @@ class ConfigWatcherTest(unittest.TestCase):
self.cw._iteration()
- self.mock_thread_ctor.assert_called_once_with(43, '/state', {'name': 'bar'})
+ self.mock_thread_ctor.assert_called_once_with(
+ 43, '/state', {'name': 'bar'}, '/cloudtail')
self.mock_thread.start.assert_called_once_with()
self.mock_thread.start_service.assert_called_once_with()
@@ -103,7 +106,8 @@ class ConfigWatcherTest(unittest.TestCase):
self._set_config('foo.json', '{"name": "foo"}', 100)
self.cw._iteration()
- self.mock_thread_ctor.assert_called_once_with(43, '/state', {'name': 'foo'})
+ self.mock_thread_ctor.assert_called_once_with(
+ 43, '/state', {'name': 'foo'}, '/cloudtail')
self._set_config('foo.json', '{"name": "foo", "args": [1, 2, 3]}', 200)
@@ -139,7 +143,8 @@ class ConfigWatcherTest(unittest.TestCase):
self._set_config('foo.json', '{"name": "foo"}', 200)
self.cw._iteration()
- self.mock_thread_ctor.assert_called_once_with(43, '/state', {'name': 'foo'})
+ self.mock_thread_ctor.assert_called_once_with(
+ 43, '/state', {'name': 'foo'}, '/cloudtail')
self.mock_thread.start.assert_called_once_with()
self.mock_thread.start_service.assert_called_once_with()
@@ -158,7 +163,8 @@ class ConfigWatcherTest(unittest.TestCase):
self._set_config('foo.json', '{"name": "foo"}', 100)
self.cw._iteration()
- self.mock_thread_ctor.assert_called_once_with(43, '/state', {'name': 'foo'})
+ self.mock_thread_ctor.assert_called_once_with(
+ 43, '/state', {'name': 'foo'}, '/cloudtail')
self.mock_thread.start.assert_called_once_with()
self.mock_thread.start_service.assert_called_once_with()
@@ -182,7 +188,8 @@ class ConfigWatcherTest(unittest.TestCase):
self._set_config('foo.json', '{"name": "foo"}', 100)
self.cw._iteration()
- self.mock_thread_ctor.assert_called_once_with(43, '/state', {'name': 'foo'})
+ self.mock_thread_ctor.assert_called_once_with(
+ 43, '/state', {'name': 'foo'}, '/cloudtail')
self.mock_thread.start.assert_called_once_with()
self.mock_thread.start_service.assert_called_once_with()
@@ -195,7 +202,8 @@ class ConfigWatcherTest(unittest.TestCase):
self._set_config('foo.json', '{"name": "foo"}', 100)
self.cw._iteration()
- self.mock_thread_ctor.assert_called_once_with(43, '/state', {'name': 'foo'})
+ self.mock_thread_ctor.assert_called_once_with(
+ 43, '/state', {'name': 'foo'}, '/cloudtail')
self.mock_thread.start.assert_called_once_with()
self.mock_thread.start_service.assert_called_once_with()
@@ -216,7 +224,8 @@ class ConfigWatcherTest(unittest.TestCase):
self._set_config('foo.json', '{"name": "foo"}', 100)
self.cw._iteration()
- self.mock_thread_ctor.assert_called_once_with(43, '/state', {'name': 'foo'})
+ self.mock_thread_ctor.assert_called_once_with(
+ 43, '/state', {'name': 'foo'}, '/cloudtail')
def sleep_impl(_duration):
self.cw.stop()

Powered by Google App Engine
This is Rietveld 408576698