Revert "Disable "unsafe" os-fault operation."

The code is completely safe and will run only if os-faults configuration is present.

This reverts commit b9dfc8c04c.

Change-Id: I79b6919fed22e7b28a5e51098562c28fb130153f
This commit is contained in:
Arie Bregman 2019-02-18 16:43:28 +00:00
parent b9dfc8c04c
commit 25948c5c73
1 changed files with 13 additions and 0 deletions

View File

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