Beispiel #1
0
 def test_worker_not_coordinator(self, configure_mock, get_conf_mock):
     env.host = "my.host1"
     env.roledefs["worker"] = ["my.host1"]
     env.roledefs["coordinator"] = ["my.host2"]
     deploy.workers()
     assert configure_mock.called
 def test_worker_not_coordinator(self,  configure_mock, get_conf_mock):
     env.host = "my.host1"
     env.roledefs["worker"] = ["my.host1"]
     env.roledefs["coordinator"] = ["my.host2"]
     deploy.workers()
     assert configure_mock.called
Beispiel #3
0
 def test_worker_is_coordinator(self, env_mock, coord_mock, configure_mock):
     env_mock.host = "my.host"
     coord_mock.return_value = ["my.host"]
     deploy.workers()
     assert not configure_mock.called
 def test_worker_is_coordinator(self, env_mock, coord_mock, configure_mock):
     env_mock.host = "my.host"
     coord_mock.return_value = ["my.host"]
     deploy.workers()
     assert not configure_mock.called