tests: Add decorator to mark unstable tests
As it was agreed on Neutron CI meeting, we're going to mark unstable
tests in fullstack suite with this decorator while working in paralel on
stabilization of such tests.
Mark the DVR east-west tests as unstable to prove it works.
Conflicts:
neutron/tests/tempest/scenario/base.py
NOTE: This is a squash of the unstable decorator change and another
to the neutron-tempest-plugin repo during the Queens cycle.
Related-bug: #1717302
Change-Id: I3beb6e7a4d96da778378e9d979cb8c6261f6036b
(cherry picked from commit bdda46ade7
)
(cherry picked from commit ba80045aabbdf5bbf66e39ed5aecad72eb3d86ef)
This commit is contained in:
parent
64a9d41d74
commit
dbd6dbb5e1
|
@ -12,6 +12,7 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import functools
|
||||
import subprocess
|
||||
|
||||
import netaddr
|
||||
|
@ -32,6 +33,20 @@ CONF = config.CONF
|
|||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
||||
def unstable_test(reason):
|
||||
def decor(f):
|
||||
@functools.wraps(f)
|
||||
def inner(self, *args, **kwargs):
|
||||
try:
|
||||
return f(self, *args, **kwargs)
|
||||
except Exception as e:
|
||||
msg = ("%s was marked as unstable because of %s, "
|
||||
"failure was: %s") % (self.id(), reason, e)
|
||||
raise self.skipTest(msg)
|
||||
return inner
|
||||
return decor
|
||||
|
||||
|
||||
class BaseTempestTestCase(base_api.BaseNetworkTest):
|
||||
@classmethod
|
||||
def resource_setup(cls):
|
||||
|
|
|
@ -134,6 +134,7 @@ class FloatingIpSameNetwork(FloatingIpTestCasesMixin,
|
|||
|
||||
same_network = True
|
||||
|
||||
@base.unstable_test("bug 1717302")
|
||||
@decorators.idempotent_id('05c4e3b3-7319-4052-90ad-e8916436c23b')
|
||||
def test_east_west(self):
|
||||
self._test_east_west()
|
||||
|
@ -151,6 +152,7 @@ class FloatingIpSeparateNetwork(FloatingIpTestCasesMixin,
|
|||
|
||||
same_network = False
|
||||
|
||||
@base.unstable_test("bug 1717302")
|
||||
@decorators.idempotent_id('f18f0090-3289-4783-b956-a0f8ac511e8b')
|
||||
def test_east_west(self):
|
||||
self._test_east_west()
|
||||
|
|
Loading…
Reference in New Issue