Merge "Add missing validation for the compute/positive"

This commit is contained in:
Zuul 2019-04-02 09:55:36 +00:00 committed by Gerrit Code Review
commit 3639f91c36
2 changed files with 22 additions and 1 deletions

View File

@ -288,6 +288,17 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
self.assertEqual('in-use', vol_after_rebuild['status'])
self.assertEqual(self.server_id,
vol_after_rebuild['attachments'][0]['server_id'])
if CONF.validation.run_validation:
validation_resources = self.get_class_validation_resources(
self.os_primary)
linux_client = remote_client.RemoteClient(
self.get_server_ip(server, validation_resources),
self.ssh_user,
password=None,
pkey=validation_resources['keypair']['private_key'],
server=server,
servers_client=self.client)
linux_client.validate_authentication()
def _test_resize_server_confirm(self, server_id, stop=False):
# The server's RAM and disk space should be modified to that of

View File

@ -126,7 +126,7 @@ class AttachVolumeTestJSON(BaseAttachVolumeTest):
@decorators.idempotent_id('7fa563fe-f0f7-43eb-9e22-a1ece036b513')
def test_list_get_volume_attachments(self):
# List volume attachment of the server
server, _ = self._create_server()
server, validation_resources = self._create_server()
volume_1st = self.create_volume()
attachment_1st = self.attach_volume(server, volume_1st)
body = self.servers_client.list_volume_attachments(
@ -149,6 +149,16 @@ class AttachVolumeTestJSON(BaseAttachVolumeTest):
server['id'])['volumeAttachments']
self.assertEqual(2, len(body))
if CONF.validation.run_validation:
linux_client = remote_client.RemoteClient(
self.get_server_ip(server, validation_resources),
self.image_ssh_user,
self.image_ssh_password,
validation_resources['keypair']['private_key'],
server=server,
servers_client=self.servers_client)
linux_client.validate_authentication()
for attachment in [attachment_1st, attachment_2nd]:
body = self.servers_client.show_volume_attachment(
server['id'], attachment['id'])['volumeAttachment']