Artom Lifshitz 2015942d6e Subclass API tests instead of scenario
Our tests are only for the compute API (and related compute things).
They are not scenario tests as defined in the Tempest scenario README.
This patch moves our tests to subclass the Tempest base compute test
class. While this isn't guaranteed to be a stable interface, it's
convenient enough (we gain helper methods) that the potential
maintenance overhead is deemed worth it. Our unit tests are also moved
up a directory, with tests/ now being only for unit tests and
tempest/api for our test cases.

Change-Id: Ie34aa99765c3fa8a136fa4cb1b11edb3d8c76ba3
2018-07-13 10:38:09 -04:00

33 lines
1008 B
Python

# Copyright 2016 Red Hat
# All Rights Reserved.
#
# 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.
from oslo_log import log as logging
from tempest.api.compute import base
from tempest import config
CONF = config.CONF
LOG = logging.getLogger(__name__)
class BaseTest(base.BaseV2ComputeTest):
credentials = ['primary', 'admin']
@classmethod
def setup_clients(cls):
super(BaseTest, cls).setup_clients()
cls.servers_client = cls.os_admin.servers_client