Update tests to do not use deprecated test.services()
Function 'tempest.test.services()' has moved to 'tempest.common.utils.services()' in version 'Pike'. This commit update tests accordingly. Change-Id: I27ae5aa786cf3a3c5c654644c23f59fde7693e6b
This commit is contained in:
parent
1b84076ee6
commit
9caf1e65f5
|
@ -32,11 +32,11 @@ from six.moves.urllib import error
|
|||
from six.moves.urllib import request as urllib2
|
||||
from tempest import clients
|
||||
from tempest.common import credentials_factory
|
||||
from tempest.common import utils
|
||||
from tempest.common import waiters
|
||||
from tempest import config
|
||||
from tempest.lib.common.utils import test_utils
|
||||
from tempest.lib import exceptions as lib_exc
|
||||
from tempest import test
|
||||
|
||||
|
||||
from octavia.i18n import _
|
||||
|
@ -101,7 +101,7 @@ class BaseTestCase(manager.NetworkScenarioTest):
|
|||
def skip_checks(cls):
|
||||
super(BaseTestCase, cls).skip_checks()
|
||||
cfg = config.network
|
||||
if not test.is_extension_enabled('lbaasv2', 'network'):
|
||||
if not utils.is_extension_enabled('lbaasv2', 'network'):
|
||||
msg = 'LBaaS Extension is not enabled'
|
||||
raise cls.skipException(msg)
|
||||
if not (cfg.project_networks_reachable or cfg.public_network_id):
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tempest.common import utils
|
||||
from tempest.lib import decorators
|
||||
from tempest import test
|
||||
|
||||
from octavia.tests.tempest.v1.scenario import base
|
||||
|
||||
|
@ -27,7 +27,7 @@ class TestLoadBalancerQuota(base.BaseTestCase):
|
|||
with a quota exceeded code.
|
||||
"""
|
||||
|
||||
@test.services('compute', 'network')
|
||||
@utils.services('compute', 'network')
|
||||
@decorators.skip_because(bug="1656110")
|
||||
def test_load_balancer_quota(self):
|
||||
self._set_quotas(project_id=None, load_balancer=1)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tempest import test
|
||||
from tempest.common import utils
|
||||
|
||||
from octavia.tests.tempest.v1.scenario import base
|
||||
|
||||
|
@ -31,7 +31,7 @@ class TestListenerBasic(base.BaseTestCase):
|
|||
5. Delete listener and validate the traffic is not sent to any members.
|
||||
"""
|
||||
|
||||
@test.services('compute', 'network')
|
||||
@utils.services('compute', 'network')
|
||||
def test_load_balancer_basic(self):
|
||||
self._create_server('server1')
|
||||
self._start_backend_httpd_processes('server1')
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tempest.common import utils
|
||||
from tempest import config
|
||||
from tempest import test
|
||||
|
||||
|
||||
from octavia.tests.tempest.v1.scenario import base
|
||||
|
@ -24,7 +24,7 @@ config = config.CONF
|
|||
|
||||
class TestLoadBalancerTreeMinimal(base.BaseTestCase):
|
||||
|
||||
@test.services('compute', 'network')
|
||||
@utils.services('compute', 'network')
|
||||
def test_load_balancer_tree_minimal(self):
|
||||
"""This test checks basic load balancing.
|
||||
|
||||
|
|
|
@ -32,12 +32,12 @@ from six.moves.urllib import error
|
|||
from six.moves.urllib import request as urllib2
|
||||
from tempest import clients
|
||||
from tempest.common import credentials_factory
|
||||
from tempest.common import utils
|
||||
from tempest.common import waiters
|
||||
from tempest import config
|
||||
from tempest import exceptions
|
||||
from tempest.lib.common.utils import test_utils
|
||||
from tempest.lib import exceptions as lib_exc
|
||||
from tempest import test
|
||||
|
||||
|
||||
from octavia.i18n import _
|
||||
|
@ -102,7 +102,7 @@ class BaseTestCase(manager.NetworkScenarioTest):
|
|||
def skip_checks(cls):
|
||||
super(BaseTestCase, cls).skip_checks()
|
||||
cfg = config.network
|
||||
if not test.is_extension_enabled('lbaasv2', 'network'):
|
||||
if not utils.is_extension_enabled('lbaasv2', 'network'):
|
||||
msg = 'LBaaS Extension is not enabled'
|
||||
raise cls.skipException(msg)
|
||||
if not (cfg.project_networks_reachable or cfg.public_network_id):
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tempest.common import utils
|
||||
from tempest.lib import decorators
|
||||
from tempest import test
|
||||
|
||||
from octavia.tests.tempest.v2.scenario import base
|
||||
|
||||
|
@ -27,7 +27,7 @@ class TestLoadBalancerQuota(base.BaseTestCase):
|
|||
with a quota exceeded code.
|
||||
"""
|
||||
|
||||
@test.services('compute', 'network')
|
||||
@utils.services('compute', 'network')
|
||||
@decorators.skip_because(bug="1656110")
|
||||
def test_load_balancer_quota(self):
|
||||
self._set_quotas(project_id=None, load_balancer=1)
|
||||
|
|
Loading…
Reference in New Issue