Parcourir la source

Merge "mark test_router_association_update unit test as unreliable"

tags/10.0.0.0b1
Zuul il y a 8 mois
Parent
révision
79b5e294f8

+ 4
- 0
networking_bgpvpn/tests/unit/extensions/test_bgpvpn_routes_control.py Voir le fichier

@@ -20,8 +20,11 @@ from oslo_utils import uuidutils
20 20
 
21 21
 from neutron.extensions import l3
22 22
 from neutron.tests.unit.api.v2 import test_base
23
+
23 24
 from neutron_lib.api.definitions import bgpvpn as bgpvpn_api_def
24 25
 from neutron_lib.api.definitions import bgpvpn_routes_control as rc_api_def
26
+from neutron_lib.utils import test
27
+
25 28
 from webob import exc
26 29
 
27 30
 from networking_bgpvpn.neutron.extensions import bgpvpn
@@ -78,6 +81,7 @@ class BgpvpnRoutesControlExtensionTestCase(
78 81
         return [None, {}, {target: None}, {target: {}}
79 82
                 ]
80 83
 
84
+    @test.unstable_test("bug/1791256")
81 85
     def test_router_association_update(self):
82 86
         data = {
83 87
             'router_association': {

+ 3
- 18
networking_bgpvpn_tempest/tests/scenario/test_bgpvpn_basic.py Voir le fichier

@@ -13,7 +13,6 @@
13 13
 # License for the specific language governing permissions and limitations
14 14
 # under the License.
15 15
 
16
-import functools
17 16
 import netaddr
18 17
 import os
19 18
 import random
@@ -27,28 +26,14 @@ from tempest.lib.common.utils import data_utils
27 26
 from tempest.lib.common.utils import test_utils
28 27
 from tempest.lib import decorators
29 28
 
29
+from neutron_lib.utils import test
30
+
30 31
 from networking_bgpvpn_tempest.tests import base
31 32
 from networking_bgpvpn_tempest.tests.scenario import manager
32 33
 
33 34
 from oslo_concurrency import lockutils
34 35
 
35 36
 
36
-# TODO(tmorin): move to neutron-lib
37
-# code copied from neutron repository - neutron/tests/base.py
38
-def unstable_test(reason):
39
-    def decor(f):
40
-        @functools.wraps(f)
41
-        def inner(self, *args, **kwargs):
42
-            try:
43
-                return f(self, *args, **kwargs)
44
-            except Exception as e:
45
-                msg = ("%s was marked as unstable because of %s, "
46
-                       "failure was: %s") % (self.id(), reason, e)
47
-                raise self.skipTest(msg)
48
-        return inner
49
-    return decor
50
-
51
-
52 37
 CONF = config.CONF
53 38
 LOG = logging.getLogger(__name__)
54 39
 NET_A = 'A'
@@ -686,7 +671,7 @@ class TestBGPVPNBasic(base.BaseBgpvpnTest, manager.NetworkScenarioTest):
686 671
     @decorators.idempotent_id('d92a8a18-c4d0-40d5-8592-713d7dae7d25')
687 672
     @utils.services('compute', 'network')
688 673
     @utils.requires_ext(extension='bgpvpn-routes-control', service='network')
689
-    @unstable_test("bug 1780205")
674
+    @test.unstable_test("bug 1780205")
690 675
     def test_port_association_many_bgpvpn_routes(self):
691 676
         """This test checks port association in BGPVPN.
692 677
 

Chargement…
Annuler
Enregistrer