def test_perform_remote_false_action(self): """Test perform an action in remote mode=False""" action = Action('start', command='hostname -s', target='node1') action.remote = False svc = Service('Local') svc.add_action(action) mytopo = tempfile.NamedTemporaryFile('w') mytopo.write(u"[routes]\n%s: node1\n" % HOSTNAME) mytopo.flush() task_self().load_topology(mytopo.name) mytopo.close() svc.run('start') buff = action.worker.node_buffer('node1') self.assertEqual(buff, HOSTNAME)
def test_perform_remote_false_action(self): """Test perform an action in remote mode=False""" action = Action('start', command='hostname -s', target='node1') action.remote = False svc = Service('Local') svc.add_action(action) mytopo = tempfile.NamedTemporaryFile('w') mytopo.write(u"[routes]\n%s: node1\n" % HOSTNAME) mytopo.flush() task_self().load_topology(mytopo.name) mytopo.close() svc.run('start') buff = action.worker.node_buffer('node1').decode() self.assertEqual(buff, HOSTNAME)