[ARVADOS] updated: c39a451b64ec5f945510a14ad7ce9404a196c6ea

Git user git at public.curoverse.com
Thu Mar 17 10:42:05 EDT 2016


Summary of changes:
 services/nodemanager/tests/test_daemon.py | 5 ++---
 services/nodemanager/tests/testutil.py    | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

       via  c39a451b64ec5f945510a14ad7ce9404a196c6ea (commit)
      from  eb7bbb707418b7505983c132531a0c3c7963b5f5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit c39a451b64ec5f945510a14ad7ce9404a196c6ea
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Mar 17 10:42:02 2016 -0400

    8561: Set ec2_instance_id and cloud_factory().node_id to mock cloud/arvados id
    instead of constant '2'.

diff --git a/services/nodemanager/tests/test_daemon.py b/services/nodemanager/tests/test_daemon.py
index 9502cee..038ab0c 100644
--- a/services/nodemanager/tests/test_daemon.py
+++ b/services/nodemanager/tests/test_daemon.py
@@ -60,7 +60,7 @@ class NodeManagerDaemonActorTestCase(testutil.ActorTestMixin,
         self.cloud_factory().node_start_time.return_value = time.time()
         self.cloud_updates = mock.MagicMock(name='updates_mock')
         self.timer = testutil.MockTimer(deliver_immediately=False)
-        self.cloud_factory().node_id.return_value = '2'
+        self.cloud_factory().node_id.side_effect = lambda node: node.id
 
         self.node_setup = mock.MagicMock(name='setup_mock')
         self.node_setup.start.side_effect = self.mock_node_start
@@ -113,7 +113,6 @@ class NodeManagerDaemonActorTestCase(testutil.ActorTestMixin,
         self.assertTrue(self.node_setup.start.called)
 
     def check_monitors_arvados_nodes(self, *arv_nodes):
-        logging.info("XYZ %s\n\n%s", arv_nodes, self.monitored_arvados_nodes())
         self.assertItemsEqual(arv_nodes, self.monitored_arvados_nodes())
 
     def test_node_pairing(self):
@@ -126,7 +125,7 @@ class NodeManagerDaemonActorTestCase(testutil.ActorTestMixin,
     def test_node_pairing_after_arvados_update(self):
         cloud_node = testutil.cloud_node_mock(2)
         self.make_daemon([cloud_node],
-                         [testutil.arvados_node_mock(2, ip_address=None)])
+                         [testutil.arvados_node_mock(1, ip_address=None)])
         arv_node = testutil.arvados_node_mock(2)
         self.daemon.update_arvados_nodes([arv_node]).get(self.TIMEOUT)
         self.stop_proxy(self.daemon)
diff --git a/services/nodemanager/tests/testutil.py b/services/nodemanager/tests/testutil.py
index b9e2ce3..b9e7bea 100644
--- a/services/nodemanager/tests/testutil.py
+++ b/services/nodemanager/tests/testutil.py
@@ -31,7 +31,7 @@ def arvados_node_mock(node_num=99, job_uuid=None, age=-1, **kwargs):
             'job_uuid': job_uuid,
             'crunch_worker_state': crunch_worker_state,
             'properties': {},
-            'info': {'ping_secret': 'defaulttestsecret', 'ec2_instance_id': '2'}}
+            'info': {'ping_secret': 'defaulttestsecret', 'ec2_instance_id': str(node_num)}}
     node.update(kwargs)
     return node
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list