""" import abc import os 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 import exception from castellan.key_manager import vault_key_manager from castellan.tests.functional import config from castellan.tests.functional.key_manager import test_key_manager CONF = config.get_config() class VaultKeyManagerTestCase(test_key_manager.KeyManagerTestCase): def _create_key_manager(self): key_mgr = vault_key_manager.VaultKeyManager(cfg.CONF) if ('VAULT_TEST_URL' not in os.environ or 'VAULT_TEST_ROOT_TOKEN' not in os.environ): raise testcase.TestSkipped('Missing Vault setup information') key_mgr._root_token_id = os.environ['VAULT_TEST_ROOT_TOKEN'] key_mgr._vault_url = os.environ['VAULT_TEST_URL'] return key_mgr @abc.abstractmethod
import os import uuid from oslo_config import cfg from oslo_context import context 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 from castellan.tests.functional import config from castellan.tests.functional.key_manager import test_key_manager CONF = config.get_config() class VaultKeyManagerTestCase(test_key_manager.KeyManagerTestCase): def _create_key_manager(self): key_mgr = vault_key_manager.VaultKeyManager(cfg.CONF) if ('VAULT_TEST_URL' not in os.environ or 'VAULT_TEST_ROOT_TOKEN' not in os.environ): raise testcase.TestSkipped('Missing Vault setup information') key_mgr._root_token_id = os.environ['VAULT_TEST_ROOT_TOKEN'] key_mgr._vault_url = os.environ['VAULT_TEST_URL'] return key_mgr @abc.abstractmethod