Merge "Disable "unsafe" os-fault operation (for the second time)"

This commit is contained in:
Zuul 2019-03-07 10:10:45 +00:00 committed by Gerrit Code Review
commit 3ad5cce3c9

View File

@ -14,24 +14,13 @@
# under the License. # under the License.
from __future__ import absolute_import from __future__ import absolute_import
import testscenarios
from testscenarios.scenarios import multiply_scenarios
from tobiko.tests.scenario import base from tobiko.tests.scenario import base
from tobiko.common.asserts import assert_ping from tobiko.common.asserts import assert_ping
from tobiko.common.managers import fault
load_tests = testscenarios.load_tests_apply_scenarios
class FloatingIPTest(base.ScenarioTestsBase): class FloatingIPTest(base.ScenarioTestsBase):
"""Tests server connectivity""" """Tests server connectivity"""
fault_manager = fault.FaultManager(__file__)
test_faults = fault_manager.scenarios
if test_faults:
scenarios = multiply_scenarios(test_faults)
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
super(FloatingIPTest, cls).setUpClass() super(FloatingIPTest, cls).setUpClass()
@ -40,9 +29,7 @@ class FloatingIPTest(base.ScenarioTestsBase):
def test_ping_floating_ip(self): def test_ping_floating_ip(self):
"""Validates connectivity to a server post upgrade.""" """Validates connectivity to a server post upgrade."""
self.fault_manager.run_fault(self.fault)
assert_ping(self.fip) assert_ping(self.fip)
def test_ping_unreachable_floating_ip(self): def test_ping_unreachable_floating_ip(self):
self.fault_manager.run_fault(self.fault)
assert_ping(self.unreachable_fip, should_fail=True) assert_ping(self.unreachable_fip, should_fail=True)