Merge "Replace use of testtools.testcase.TestSkipped"
This commit is contained in:
commit
c6e7b4abbc
@ -18,7 +18,9 @@ Functional test cases for the Barbican key manager.
|
||||
|
||||
Note: This requires local running instances of Barbican and Keystone.
|
||||
"""
|
||||
|
||||
import abc
|
||||
import unittest
|
||||
|
||||
from keystoneauth1 import identity
|
||||
from keystoneauth1 import session
|
||||
@ -26,7 +28,6 @@ from oslo_config import cfg
|
||||
from oslo_context import context
|
||||
from oslo_utils import uuidutils
|
||||
from oslotest import base
|
||||
from testtools import testcase
|
||||
|
||||
from castellan.common.credentials import keystone_password
|
||||
from castellan.common.credentials import keystone_token
|
||||
@ -59,7 +60,7 @@ class BarbicanKeyManagerTestCase(test_key_manager.KeyManagerTestCase):
|
||||
except Exception as e:
|
||||
# When we run functional-vault target, This test class needs
|
||||
# to be skipped as barbican is not running
|
||||
raise testcase.TestSkipped(str(e))
|
||||
raise unittest.SkipTest(str(e))
|
||||
|
||||
def tearDown(self):
|
||||
super(BarbicanKeyManagerTestCase, self).tearDown()
|
||||
|
@ -15,14 +15,15 @@ Functional test cases for the Vault key manager.
|
||||
|
||||
Note: This requires local running instance of Vault.
|
||||
"""
|
||||
|
||||
import os
|
||||
import unittest
|
||||
import uuid
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
from oslotest import base
|
||||
import requests
|
||||
from testtools import testcase
|
||||
|
||||
from castellan.common import exception
|
||||
from castellan.key_manager import vault_key_manager
|
||||
@ -39,7 +40,7 @@ class VaultKeyManagerTestCase(test_key_manager.KeyManagerTestCase,
|
||||
|
||||
if ('VAULT_TEST_URL' not in os.environ or
|
||||
'VAULT_TEST_ROOT_TOKEN' not in os.environ):
|
||||
raise testcase.TestSkipped('Missing Vault setup information')
|
||||
raise unittest.SkipTest('Missing Vault setup information')
|
||||
|
||||
key_mgr._root_token_id = os.environ['VAULT_TEST_ROOT_TOKEN']
|
||||
key_mgr._vault_url = os.environ['VAULT_TEST_URL']
|
||||
@ -90,7 +91,7 @@ class VaultKeyManagerAppRoleTestCase(VaultKeyManagerTestCase):
|
||||
|
||||
if ('VAULT_TEST_URL' not in os.environ or
|
||||
'VAULT_TEST_ROOT_TOKEN' not in os.environ):
|
||||
raise testcase.TestSkipped('Missing Vault setup information')
|
||||
raise unittest.SkipTest('Missing Vault setup information')
|
||||
|
||||
self.root_token_id = os.environ['VAULT_TEST_ROOT_TOKEN']
|
||||
self.vault_url = os.environ['VAULT_TEST_URL']
|
||||
|
Loading…
x
Reference in New Issue
Block a user