Test rebooting VM with floating IP test cases
Change-Id: I36a4bf08cf7a39d626e939f61281556638638099
This commit is contained in:
parent
60bb46639d
commit
1d6ee9e318
@ -35,6 +35,7 @@ CirrosPeerServerStackFixture = _cirros.CirrosPeerServerStackFixture
|
||||
CirrosDifferentHostServerStackFixture = (
|
||||
_cirros.CirrosDifferentHostServerStackFixture)
|
||||
CirrosSameHostServerStackFixture = _cirros.CirrosSameHostServerStackFixture
|
||||
RebootCirrosServerOperation = _cirros.RebootCirrosServerOperation
|
||||
|
||||
L3haNetworkStackFixture = _l3ha.L3haNetworkStackFixture
|
||||
L3haServerStackFixture = _l3ha.L3haServerStackFixture
|
||||
|
@ -17,6 +17,8 @@ import tobiko
|
||||
from tobiko import config
|
||||
from tobiko.openstack import glance
|
||||
from tobiko.openstack.stacks import _nova
|
||||
from tobiko.shell import sh
|
||||
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
@ -63,3 +65,12 @@ class CirrosSameHostServerStackFixture(
|
||||
class CirrosDifferentHostServerStackFixture(
|
||||
CirrosPeerServerStackFixture, _nova.DifferentHostServerStackFixture):
|
||||
pass
|
||||
|
||||
|
||||
class RebootCirrosServerOperation(sh.RebootHostOperation):
|
||||
|
||||
stack = tobiko.required_setup_fixture(CirrosServerStackFixture)
|
||||
|
||||
@property
|
||||
def ssh_client(self):
|
||||
return self.stack.ssh_client
|
||||
|
@ -27,12 +27,15 @@ from tobiko.openstack import stacks
|
||||
CONF = config.CONF
|
||||
|
||||
|
||||
class FloatingIPTest(testtools.TestCase):
|
||||
class FloatingIPTest(tobiko.RunsOperations, testtools.TestCase):
|
||||
"""Tests connectivity via floating IPs"""
|
||||
|
||||
#: Resources stack with floating IP and Nova server
|
||||
stack = tobiko.required_setup_fixture(stacks.CirrosServerStackFixture)
|
||||
|
||||
#: Reboots target server
|
||||
server_reboot = tobiko.runs_operation(stacks.RebootCirrosServerOperation)
|
||||
|
||||
def test_stack_create_complete(self):
|
||||
self.stack.key_pair_stack.wait_for_create_complete()
|
||||
self.stack.network_stack.wait_for_create_complete()
|
||||
|
Loading…
Reference in New Issue
Block a user