
This change, replaces the authentication wrapper for our functional test calls with a simple wrapper using Keystone client. As a result, this change removes our dependence on Tempest trunk to run our functional tests. Unfortunately, this was done primarally due to the uncompability between Tempest's oslo.log and the oslo_log that we use in Barbican that was causing our gates to fail and blocking merges across the project. Change-Id: I0eee6a34d1ab5ca654e737d95c1e124465dc9c14
56 lines
1.6 KiB
Python
56 lines
1.6 KiB
Python
"""
|
|
Copyright 2014 Rackspace
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT 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 logging
|
|
|
|
import oslotest.base as oslotest
|
|
|
|
from functionaltests.common import client
|
|
from functionaltests.common import config
|
|
|
|
CONF = config.get_config()
|
|
|
|
|
|
class TestCase(oslotest.BaseTestCase):
|
|
max_payload_size = 10000
|
|
max_sized_payload = 'a' * max_payload_size
|
|
oversized_payload = 'a' * (max_payload_size + 1)
|
|
max_field_size = 255
|
|
max_sized_field = 'a' * max_field_size
|
|
oversized_field = 'a' * (max_field_size + 1)
|
|
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
cls.LOG = logging.getLogger(cls._get_full_case_name())
|
|
super(TestCase, cls).setUpClass()
|
|
|
|
def setUp(self):
|
|
self.LOG.info('Starting: %s', self._testMethodName)
|
|
super(TestCase, self).setUp()
|
|
|
|
self.client = client.BarbicanClient()
|
|
|
|
def tearDown(self):
|
|
super(TestCase, self).tearDown()
|
|
self.LOG.info('Finished: %s\n', self._testMethodName)
|
|
|
|
@classmethod
|
|
def _get_full_case_name(cls):
|
|
name = '{module}:{case_name}'.format(
|
|
module=cls.__module__,
|
|
case_name=cls.__name__
|
|
)
|
|
return name
|