Move test_ha_add_compute to another suite. Refator it for 3.2

This commit is contained in:
nfedotov 2013-09-05 17:01:00 +04:00
parent a6843b9b7e
commit 610f0e0150
2 changed files with 26 additions and 20 deletions

View File

@ -52,25 +52,5 @@ class TestNode(BaseNodeTestCase):
self.assertTaskSuccess(task, 60 * 2)
self.run_OSTF(cluster_id=cluster_id, should_fail=6, should_pass=18)
@snapshot_errors
@logwrap
@fetch_logs
def test_ha_add_compute(self):
nodes_dict = {
'controller': ['slave-01', 'slave-02', 'slave-03'],
'compute': ['slave-04', 'slave-05']
}
cluster_id = self.prepare_environment(settings=nodes_dict)
self.bootstrap_nodes(self.nodes().slaves[5:6])
self.update_nodes(cluster_id, {'compute': [
n.name for n in self.nodes().slaves[5:6]]}, True, False)
task = self.client.deploy_cluster_changes(cluster_id)
self.assertTaskSuccess(task)
self.assertEqual(6, len(self.client.list_cluster_nodes(cluster_id)))
self.run_OSTF(cluster_id=cluster_id, should_fail=6, should_pass=18)
if __name__ == '__main__':
unittest.main()

View File

@ -52,5 +52,31 @@ class TestNode(BaseNodeTestCase):
self.assertTaskSuccess(task, 60 * 2)
self.run_OSTF(cluster_id=cluster_id, should_fail=6, should_pass=18)
@snapshot_errors
@logwrap
@fetch_logs
def test_ha_add_compute(self):
cluster_id = self.prepare_environment(
name="ha_flat",
settings={
'nodes': {
'slave-01': ['controller'],
'slave-02': ['controller'],
'slave-03': ['controller'],
'slave-04': ['compute'],
'slave-05': ['compute']
}
}
)
self.bootstrap_nodes(self.nodes().slaves[5:6])
self.update_nodes(cluster_id, {'slave-06': ['compute']}, True, False)
task = self.client.deploy_cluster_changes(cluster_id)
self.assertTaskSuccess(task)
self.assertEqual(6, len(self.client.list_cluster_nodes(cluster_id)))
self.run_OSTF(cluster_id=cluster_id, should_fail=6, should_pass=18)
if __name__ == '__main__':
unittest.main()