Merge "Refactoring of functional.regression.test_bug_1702454"

This commit is contained in:
Zuul 2020-12-16 02:47:45 +00:00 committed by Gerrit Code Review
commit fc38f822dd

View File

@ -110,15 +110,14 @@ class SchedulerOnlyChecksTargetTest(test.TestCase,
# only possibility the instance can end up on it is because the # only possibility the instance can end up on it is because the
# scheduler should only verify the requested destination as host2 # scheduler should only verify the requested destination as host2
# is weighed lower than host3. # is weighed lower than host3.
evacuate = { target_host = 'host2'
'evacuate': {
'host': 'host2'
}
}
self.admin_api.post_server_action(server['id'], evacuate)
self._wait_for_state_change(server, 'ACTIVE') post_args = {
server = self.admin_api.get_server(server_id) 'host': target_host
}
server = self._evacuate_server(
server, extra_post_args=post_args, expected_host=target_host)
# Yeepee, that works! # Yeepee, that works!
self.assertEqual('host2', server['OS-EXT-SRV-ATTR:host']) self.assertEqual(target_host, server['OS-EXT-SRV-ATTR:host'])