Sort node ids in cli acceptance tests

For improving predicability we should sort nodes ids
Closes-bug:1578664

Change-Id: Ibf3a197c307fd849dac477f6983d3cbfe4c5ceb4
This commit is contained in:
Vladimir Khlyunev 2016-05-06 12:37:27 +03:00
parent 96fb6a8b65
commit 10535cf719
4 changed files with 20 additions and 28 deletions

View File

@ -125,9 +125,8 @@ class CommandLineTest(test_cli_base.CommandLine):
Duration 50m
"""
self.env.revert_snapshot("ready_with_3_slaves")
node_ids = [self.fuel_web.get_nailgun_node_by_devops_node(
self.env.d_env.nodes().slaves[
slave_id])['id']for slave_id in range(3)]
node_ids = sorted([node['id'] for node in
self.fuel_web.client.list_nodes()])
release_id = self.fuel_web.get_releases_list_for_os(
release_name=OPENSTACK_RELEASE)[0]
admin_ip = self.ssh_manager.admin_ip
@ -421,7 +420,8 @@ class CommandLineTest(test_cli_base.CommandLine):
)
# Get nodes ids
node_ids = [node['id'] for node in self.fuel_web.client.list_nodes()]
node_ids = sorted([node['id'] for node in
self.fuel_web.client.list_nodes()])
admin_ip = self.ssh_manager.admin_ip
# Add and provision a controller node node_ids[0]

View File

@ -46,9 +46,8 @@ class CommandLineAcceptanceDeploymentTests(test_cli_base.CommandLine):
"""
self.env.revert_snapshot("ready_with_3_slaves")
node_ids = [self.fuel_web.get_nailgun_node_by_devops_node(
self.env.d_env.nodes().slaves[slave_id])['id']
for slave_id in range(3)]
node_ids = sorted([node['id'] for node in
self.fuel_web.client.list_nodes()])
release_id = self.fuel_web.get_releases_list_for_os(
release_name=OPENSTACK_RELEASE)[0]
@ -120,9 +119,8 @@ class CommandLineAcceptanceDeploymentTests(test_cli_base.CommandLine):
Duration 50m
"""
self.env.revert_snapshot("ready_with_3_slaves")
node_ids = [self.fuel_web.get_nailgun_node_by_devops_node(
self.env.d_env.nodes().slaves[slave_id])['id']
for slave_id in range(3)]
node_ids = sorted([node['id'] for node in
self.fuel_web.client.list_nodes()])
release_id = self.fuel_web.get_releases_list_for_os(
release_name=OPENSTACK_RELEASE)[0]

View File

@ -51,9 +51,8 @@ class CommandLineAcceptanceCephDeploymentTests(test_cli_base.CommandLine):
self.env.bootstrap_nodes(
self.env.d_env.nodes().slaves[:7])
node_ids = [self.fuel_web.get_nailgun_node_by_devops_node(
self.env.d_env.nodes().slaves[slave_id])['id']
for slave_id in range(7)]
node_ids = sorted([node['id'] for node in
self.fuel_web.client.list_nodes()])
release_id = self.fuel_web.get_releases_list_for_os(
release_name=OPENSTACK_RELEASE)[0]
@ -133,9 +132,8 @@ class CommandLineAcceptanceCephDeploymentTests(test_cli_base.CommandLine):
self.env.revert_snapshot("ready_with_9_slaves")
node_ids = [self.fuel_web.get_nailgun_node_by_devops_node(
self.env.d_env.nodes().slaves[slave_id])['id']
for slave_id in range(8)]
node_ids = sorted([node['id'] for node in
self.fuel_web.client.list_nodes()])
release_id = self.fuel_web.get_releases_list_for_os(
release_name=OPENSTACK_RELEASE)[0]

View File

@ -50,9 +50,8 @@ class CommandLineRoleTests(test_cli_base.CommandLine):
"""
self.show_step(1, initialize=True)
self.env.revert_snapshot("ready_with_3_slaves")
node_ids = [self.fuel_web.get_nailgun_node_by_devops_node(
self.env.d_env.nodes().slaves[slave_id])['id']
for slave_id in range(3)]
node_ids = sorted([node['id'] for node in
self.fuel_web.client.list_nodes()])
release_id = self.fuel_web.get_releases_list_for_os(
release_name=OPENSTACK_RELEASE)[0]
@ -139,9 +138,8 @@ class CommandLineRoleTests(test_cli_base.CommandLine):
"""
self.show_step(1, initialize=True)
self.env.revert_snapshot("ready_with_3_slaves")
node_ids = [self.fuel_web.get_nailgun_node_by_devops_node(
self.env.d_env.nodes().slaves[slave_id])['id']
for slave_id in range(3)]
node_ids = sorted([node['id'] for node in
self.fuel_web.client.list_nodes()])
release_id = self.fuel_web.get_releases_list_for_os(
release_name=OPENSTACK_RELEASE)[0]
templates_path = os.path.join(
@ -230,9 +228,8 @@ class CommandLineRoleTests(test_cli_base.CommandLine):
"""
self.show_step(1, initialize=True)
self.env.revert_snapshot("ready_with_3_slaves")
node_ids = [self.fuel_web.get_nailgun_node_by_devops_node(
self.env.d_env.nodes().slaves[slave_id])['id']
for slave_id in range(3)]
node_ids = sorted([node['id'] for node in
self.fuel_web.client.list_nodes()])
release_id = self.fuel_web.get_releases_list_for_os(
release_name=OPENSTACK_RELEASE)[0]
templates_path = os.path.join(
@ -315,9 +312,8 @@ class CommandLineRoleTests(test_cli_base.CommandLine):
"""
self.show_step(1, initialize=True)
self.env.revert_snapshot("ready_with_3_slaves")
node_ids = [self.fuel_web.get_nailgun_node_by_devops_node(
self.env.d_env.nodes().slaves[slave_id])['id']
for slave_id in range(3)]
node_ids = sorted([node['id'] for node in
self.fuel_web.client.list_nodes()])
release_id = self.fuel_web.get_releases_list_for_os(
release_name=OPENSTACK_RELEASE)[0]
templates_path = os.path.join(