Merge "move all functional tests to tests module"
This commit is contained in:
commit
bee04914b8
@ -10,10 +10,10 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class AvailabilityZoneTests(test.TestCase):
|
class AvailabilityZoneTests(base.TestCase):
|
||||||
"""Functional tests for availability zone. """
|
"""Functional tests for availability zone. """
|
||||||
HEADERS = ["'Zone Name'"]
|
HEADERS = ["'Zone Name'"]
|
||||||
# So far, all components have the same default availability zone name.
|
# So far, all components have the same default availability zone name.
|
@ -12,14 +12,14 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from functional.common import test
|
|
||||||
from openstackclient.common import configuration
|
from openstackclient.common import configuration
|
||||||
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
BASIC_CONFIG_HEADERS = ['Field', 'Value']
|
BASIC_CONFIG_HEADERS = ['Field', 'Value']
|
||||||
|
|
||||||
|
|
||||||
class ConfigurationTests(test.TestCase):
|
class ConfigurationTests(base.TestCase):
|
||||||
|
|
||||||
opts = "-f value -c auth.password"
|
opts = "-f value -c auth.password"
|
||||||
|
|
@ -10,10 +10,10 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class HelpTests(test.TestCase):
|
class HelpTests(base.TestCase):
|
||||||
"""Functional tests for openstackclient help output."""
|
"""Functional tests for openstackclient help output."""
|
||||||
|
|
||||||
SERVER_COMMANDS = [
|
SERVER_COMMANDS = [
|
@ -10,10 +10,10 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class QuotaTests(test.TestCase):
|
class QuotaTests(base.TestCase):
|
||||||
"""Functional tests for quota. """
|
"""Functional tests for quota. """
|
||||||
# Test quota information for compute, network and volume.
|
# Test quota information for compute, network and volume.
|
||||||
EXPECTED_FIELDS = ['instances', 'networks', 'volumes']
|
EXPECTED_FIELDS = ['instances', 'networks', 'volumes']
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class ComputeAgentTests(test.TestCase):
|
class ComputeAgentTests(base.TestCase):
|
||||||
"""Functional tests for compute agent."""
|
"""Functional tests for compute agent."""
|
||||||
|
|
||||||
ID = None
|
ID = None
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class AggregateTests(test.TestCase):
|
class AggregateTests(base.TestCase):
|
||||||
"""Functional tests for aggregate."""
|
"""Functional tests for aggregate."""
|
||||||
|
|
||||||
NAME = uuid.uuid4().hex
|
NAME = uuid.uuid4().hex
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class FlavorTests(test.TestCase):
|
class FlavorTests(base.TestCase):
|
||||||
"""Functional tests for flavor."""
|
"""Functional tests for flavor."""
|
||||||
|
|
||||||
NAME = uuid.uuid4().hex
|
NAME = uuid.uuid4().hex
|
@ -12,13 +12,13 @@
|
|||||||
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions
|
from tempest.lib import exceptions
|
||||||
|
|
||||||
|
|
||||||
class KeypairBase(test.TestCase):
|
class KeypairBase(base.TestCase):
|
||||||
"""Methods for functional tests."""
|
"""Methods for functional tests."""
|
||||||
|
|
||||||
def keypair_create(self, name=data_utils.rand_uuid()):
|
def keypair_create(self, name=data_utils.rand_uuid()):
|
@ -14,11 +14,11 @@ import time
|
|||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
from tempest.lib import exceptions
|
from tempest.lib import exceptions
|
||||||
|
|
||||||
|
|
||||||
class ServerTests(test.TestCase):
|
class ServerTests(base.TestCase):
|
||||||
"""Functional tests for openstack server commands."""
|
"""Functional tests for openstack server commands."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class ServerGroupTests(test.TestCase):
|
class ServerGroupTests(base.TestCase):
|
||||||
"""Functional tests for servergroup."""
|
"""Functional tests for servergroup."""
|
||||||
|
|
||||||
NAME = uuid.uuid4().hex
|
NAME = uuid.uuid4().hex
|
@ -10,19 +10,19 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class ExampleTests(test.TestCase):
|
class ExampleTests(base.TestCase):
|
||||||
"""Functional tests for running examples."""
|
"""Functional tests for running examples."""
|
||||||
|
|
||||||
def test_common(self):
|
def test_common(self):
|
||||||
# NOTE(stevemar): If an examples has a non-zero return
|
# NOTE(stevemar): If an examples has a non-zero return
|
||||||
# code, then execute will raise an error by default.
|
# code, then execute will raise an error by default.
|
||||||
test.execute('python', test.EXAMPLE_DIR + '/common.py --debug')
|
base.execute('python', base.EXAMPLE_DIR + '/common.py --debug')
|
||||||
|
|
||||||
def test_object_api(self):
|
def test_object_api(self):
|
||||||
test.execute('python', test.EXAMPLE_DIR + '/object_api.py --debug')
|
base.execute('python', base.EXAMPLE_DIR + '/object_api.py --debug')
|
||||||
|
|
||||||
def test_osc_lib(self):
|
def test_osc_lib(self):
|
||||||
test.execute('python', test.EXAMPLE_DIR + '/osc-lib.py --debug')
|
base.execute('python', base.EXAMPLE_DIR + '/osc-lib.py --debug')
|
@ -14,12 +14,12 @@ import os
|
|||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
BASIC_LIST_HEADERS = ['ID', 'Name']
|
BASIC_LIST_HEADERS = ['ID', 'Name']
|
||||||
|
|
||||||
|
|
||||||
class IdentityTests(test.TestCase):
|
class IdentityTests(base.TestCase):
|
||||||
"""Functional tests for Identity commands. """
|
"""Functional tests for Identity commands. """
|
||||||
|
|
||||||
USER_FIELDS = ['email', 'enabled', 'id', 'name', 'project_id',
|
USER_FIELDS = ['email', 'enabled', 'id', 'name', 'project_id',
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.tests.identity.v2 import common
|
from openstackclient.tests.functional.identity.v2 import common
|
||||||
|
|
||||||
|
|
||||||
class CatalogTests(common.IdentityTests):
|
class CatalogTests(common.IdentityTests):
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.tests.identity.v2 import common
|
from openstackclient.tests.functional.identity.v2 import common
|
||||||
|
|
||||||
|
|
||||||
class EC2CredentialsTests(common.IdentityTests):
|
class EC2CredentialsTests(common.IdentityTests):
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.tests.identity.v2 import common
|
from openstackclient.tests.functional.identity.v2 import common
|
||||||
|
|
||||||
|
|
||||||
class EndpointTests(common.IdentityTests):
|
class EndpointTests(common.IdentityTests):
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
|
||||||
from functional.tests.identity.v2 import common
|
from openstackclient.tests.functional.identity.v2 import common
|
||||||
|
|
||||||
|
|
||||||
class ProjectTests(common.IdentityTests):
|
class ProjectTests(common.IdentityTests):
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.tests.identity.v2 import common
|
from openstackclient.tests.functional.identity.v2 import common
|
||||||
|
|
||||||
|
|
||||||
class RoleTests(common.IdentityTests):
|
class RoleTests(common.IdentityTests):
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.tests.identity.v2 import common
|
from openstackclient.tests.functional.identity.v2 import common
|
||||||
|
|
||||||
|
|
||||||
class ServiceTests(common.IdentityTests):
|
class ServiceTests(common.IdentityTests):
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.tests.identity.v2 import common
|
from openstackclient.tests.functional.identity.v2 import common
|
||||||
|
|
||||||
|
|
||||||
class TokenTests(common.IdentityTests):
|
class TokenTests(common.IdentityTests):
|
@ -13,7 +13,7 @@
|
|||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions
|
from tempest.lib import exceptions
|
||||||
|
|
||||||
from functional.tests.identity.v2 import common
|
from openstackclient.tests.functional.identity.v2 import common
|
||||||
|
|
||||||
|
|
||||||
class UserTests(common.IdentityTests):
|
class UserTests(common.IdentityTests):
|
@ -14,13 +14,13 @@ import os
|
|||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
BASIC_LIST_HEADERS = ['ID', 'Name']
|
BASIC_LIST_HEADERS = ['ID', 'Name']
|
||||||
|
|
||||||
|
|
||||||
class IdentityTests(test.TestCase):
|
class IdentityTests(base.TestCase):
|
||||||
"""Functional tests for Identity commands. """
|
"""Functional tests for Identity commands. """
|
||||||
|
|
||||||
DOMAIN_FIELDS = ['description', 'enabled', 'id', 'name', 'links']
|
DOMAIN_FIELDS = ['description', 'enabled', 'id', 'name', 'links']
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.tests.identity.v3 import common
|
from openstackclient.tests.functional.identity.v3 import common
|
||||||
|
|
||||||
|
|
||||||
class CatalogTests(common.IdentityTests):
|
class CatalogTests(common.IdentityTests):
|
@ -13,7 +13,7 @@
|
|||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions
|
from tempest.lib import exceptions
|
||||||
|
|
||||||
from functional.tests.identity.v3 import common
|
from openstackclient.tests.functional.identity.v3 import common
|
||||||
|
|
||||||
|
|
||||||
class DomainTests(common.IdentityTests):
|
class DomainTests(common.IdentityTests):
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
|
||||||
from functional.tests.identity.v3 import common
|
from openstackclient.tests.functional.identity.v3 import common
|
||||||
|
|
||||||
|
|
||||||
class EndpointTests(common.IdentityTests):
|
class EndpointTests(common.IdentityTests):
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
|
||||||
from functional.tests.identity.v3 import common
|
from openstackclient.tests.functional.identity.v3 import common
|
||||||
|
|
||||||
|
|
||||||
class GroupTests(common.IdentityTests):
|
class GroupTests(common.IdentityTests):
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.tests.identity.v3 import common
|
from openstackclient.tests.functional.identity.v3 import common
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
|
||||||
from functional.tests.identity.v3 import common
|
from openstackclient.tests.functional.identity.v3 import common
|
||||||
|
|
||||||
|
|
||||||
class ProjectTests(common.IdentityTests):
|
class ProjectTests(common.IdentityTests):
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.tests.identity.v3 import common
|
from openstackclient.tests.functional.identity.v3 import common
|
||||||
|
|
||||||
|
|
||||||
class RegionTests(common.IdentityTests):
|
class RegionTests(common.IdentityTests):
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
|
||||||
from functional.tests.identity.v3 import common
|
from openstackclient.tests.functional.identity.v3 import common
|
||||||
|
|
||||||
|
|
||||||
class RoleTests(common.IdentityTests):
|
class RoleTests(common.IdentityTests):
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
|
||||||
from functional.tests.identity.v3 import common
|
from openstackclient.tests.functional.identity.v3 import common
|
||||||
|
|
||||||
|
|
||||||
class ServiceTests(common.IdentityTests):
|
class ServiceTests(common.IdentityTests):
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.tests.identity.v3 import common
|
from openstackclient.tests.functional.identity.v3 import common
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.tests.identity.v3 import common
|
from openstackclient.tests.functional.identity.v3 import common
|
||||||
|
|
||||||
|
|
||||||
class TokenTests(common.IdentityTests):
|
class TokenTests(common.IdentityTests):
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
|
||||||
from functional.tests.identity.v3 import common
|
from openstackclient.tests.functional.identity.v3 import common
|
||||||
|
|
||||||
|
|
||||||
class UserTests(common.IdentityTests):
|
class UserTests(common.IdentityTests):
|
@ -13,10 +13,10 @@
|
|||||||
import os
|
import os
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class ImageTests(test.TestCase):
|
class ImageTests(base.TestCase):
|
||||||
"""Functional tests for image. """
|
"""Functional tests for image. """
|
||||||
|
|
||||||
NAME = uuid.uuid4().hex
|
NAME = uuid.uuid4().hex
|
@ -13,10 +13,10 @@
|
|||||||
import os
|
import os
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class ImageTests(test.TestCase):
|
class ImageTests(base.TestCase):
|
||||||
"""Functional tests for image. """
|
"""Functional tests for image. """
|
||||||
|
|
||||||
NAME = uuid.uuid4().hex
|
NAME = uuid.uuid4().hex
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class AddressScopeTests(test.TestCase):
|
class AddressScopeTests(base.TestCase):
|
||||||
"""Functional tests for address scope. """
|
"""Functional tests for address scope. """
|
||||||
NAME = uuid.uuid4().hex
|
NAME = uuid.uuid4().hex
|
||||||
HEADERS = ['Name']
|
HEADERS = ['Name']
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class FloatingIpTests(test.TestCase):
|
class FloatingIpTests(base.TestCase):
|
||||||
"""Functional tests for floating ip. """
|
"""Functional tests for floating ip. """
|
||||||
SUBNET_NAME = uuid.uuid4().hex
|
SUBNET_NAME = uuid.uuid4().hex
|
||||||
NETWORK_NAME = uuid.uuid4().hex
|
NETWORK_NAME = uuid.uuid4().hex
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class IPAvailabilityTests(test.TestCase):
|
class IPAvailabilityTests(base.TestCase):
|
||||||
"""Functional tests for IP availability. """
|
"""Functional tests for IP availability. """
|
||||||
NAME = uuid.uuid4().hex
|
NAME = uuid.uuid4().hex
|
||||||
NETWORK_NAME = uuid.uuid4().hex
|
NETWORK_NAME = uuid.uuid4().hex
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class NetworkTests(test.TestCase):
|
class NetworkTests(base.TestCase):
|
||||||
"""Functional tests for network. """
|
"""Functional tests for network. """
|
||||||
NAME = uuid.uuid4().hex
|
NAME = uuid.uuid4().hex
|
||||||
HEADERS = ['Name']
|
HEADERS = ['Name']
|
@ -10,10 +10,10 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class NetworkAgentTests(test.TestCase):
|
class NetworkAgentTests(base.TestCase):
|
||||||
"""Functional tests for network agent. """
|
"""Functional tests for network agent. """
|
||||||
IDs = None
|
IDs = None
|
||||||
HEADERS = ['ID']
|
HEADERS = ['ID']
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class NetworkRBACTests(test.TestCase):
|
class NetworkRBACTests(base.TestCase):
|
||||||
"""Functional tests for network rbac. """
|
"""Functional tests for network rbac. """
|
||||||
NET_NAME = uuid.uuid4().hex
|
NET_NAME = uuid.uuid4().hex
|
||||||
PROJECT_NAME = uuid.uuid4().hex
|
PROJECT_NAME = uuid.uuid4().hex
|
@ -13,12 +13,12 @@
|
|||||||
import testtools
|
import testtools
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
# NOTE(rtheis): Routed networks is still a WIP and not enabled by default.
|
# NOTE(rtheis): Routed networks is still a WIP and not enabled by default.
|
||||||
@testtools.skip("bp/routed-networks")
|
@testtools.skip("bp/routed-networks")
|
||||||
class NetworkSegmentTests(test.TestCase):
|
class NetworkSegmentTests(base.TestCase):
|
||||||
"""Functional tests for network segment. """
|
"""Functional tests for network segment. """
|
||||||
NETWORK_NAME = uuid.uuid4().hex
|
NETWORK_NAME = uuid.uuid4().hex
|
||||||
PHYSICAL_NETWORK_NAME = uuid.uuid4().hex
|
PHYSICAL_NETWORK_NAME = uuid.uuid4().hex
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class PortTests(test.TestCase):
|
class PortTests(base.TestCase):
|
||||||
"""Functional tests for port. """
|
"""Functional tests for port. """
|
||||||
NAME = uuid.uuid4().hex
|
NAME = uuid.uuid4().hex
|
||||||
NETWORK_NAME = uuid.uuid4().hex
|
NETWORK_NAME = uuid.uuid4().hex
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class RouterTests(test.TestCase):
|
class RouterTests(base.TestCase):
|
||||||
"""Functional tests for router. """
|
"""Functional tests for router. """
|
||||||
NAME = uuid.uuid4().hex
|
NAME = uuid.uuid4().hex
|
||||||
HEADERS = ['Name']
|
HEADERS = ['Name']
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class SecurityGroupTests(test.TestCase):
|
class SecurityGroupTests(base.TestCase):
|
||||||
"""Functional tests for security group. """
|
"""Functional tests for security group. """
|
||||||
NAME = uuid.uuid4().hex
|
NAME = uuid.uuid4().hex
|
||||||
OTHER_NAME = uuid.uuid4().hex
|
OTHER_NAME = uuid.uuid4().hex
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class SecurityGroupRuleTests(test.TestCase):
|
class SecurityGroupRuleTests(base.TestCase):
|
||||||
"""Functional tests for security group rule. """
|
"""Functional tests for security group rule. """
|
||||||
SECURITY_GROUP_NAME = uuid.uuid4().hex
|
SECURITY_GROUP_NAME = uuid.uuid4().hex
|
||||||
SECURITY_GROUP_RULE_ID = None
|
SECURITY_GROUP_RULE_ID = None
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class SubnetTests(test.TestCase):
|
class SubnetTests(base.TestCase):
|
||||||
"""Functional tests for subnet. """
|
"""Functional tests for subnet. """
|
||||||
NAME = uuid.uuid4().hex
|
NAME = uuid.uuid4().hex
|
||||||
NETWORK_NAME = uuid.uuid4().hex
|
NETWORK_NAME = uuid.uuid4().hex
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class SubnetPoolTests(test.TestCase):
|
class SubnetPoolTests(base.TestCase):
|
||||||
"""Functional tests for subnet pool. """
|
"""Functional tests for subnet pool. """
|
||||||
NAME = uuid.uuid4().hex
|
NAME = uuid.uuid4().hex
|
||||||
CREATE_POOL_PREFIX = '10.100.0.0/24'
|
CREATE_POOL_PREFIX = '10.100.0.0/24'
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class ContainerTests(test.TestCase):
|
class ContainerTests(base.TestCase):
|
||||||
"""Functional tests for object containers. """
|
"""Functional tests for object containers. """
|
||||||
NAME = uuid.uuid4().hex
|
NAME = uuid.uuid4().hex
|
||||||
|
|
@ -14,14 +14,14 @@ import os
|
|||||||
import tempfile
|
import tempfile
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
BASIC_LIST_HEADERS = ['Name']
|
BASIC_LIST_HEADERS = ['Name']
|
||||||
CONTAINER_FIELDS = ['account', 'container', 'x-trans-id']
|
CONTAINER_FIELDS = ['account', 'container', 'x-trans-id']
|
||||||
OBJECT_FIELDS = ['object', 'container', 'etag']
|
OBJECT_FIELDS = ['object', 'container', 'etag']
|
||||||
|
|
||||||
|
|
||||||
class ObjectTests(test.TestCase):
|
class ObjectTests(base.TestCase):
|
||||||
"""Functional tests for Object commands. """
|
"""Functional tests for Object commands. """
|
||||||
|
|
||||||
CONTAINER_NAME = uuid.uuid4().hex
|
CONTAINER_NAME = uuid.uuid4().hex
|
43
openstackclient/tests/functional/post_test_hook.sh
Executable file
43
openstackclient/tests/functional/post_test_hook.sh
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This is a script that kicks off a series of functional tests against an
|
||||||
|
# OpenStack cloud. It will attempt to create an instance if one is not
|
||||||
|
# available. Do not run this script unless you know what you're doing.
|
||||||
|
# For more information refer to:
|
||||||
|
# http://docs.openstack.org/developer/python-openstackclient/
|
||||||
|
|
||||||
|
function generate_testr_results {
|
||||||
|
if [ -f .testrepository/0 ]; then
|
||||||
|
sudo .tox/functional/bin/testr last --subunit > $WORKSPACE/testrepository.subunit
|
||||||
|
sudo mv $WORKSPACE/testrepository.subunit $BASE/logs/testrepository.subunit
|
||||||
|
sudo .tox/functional/bin/subunit2html $BASE/logs/testrepository.subunit $BASE/logs/testr_results.html
|
||||||
|
sudo gzip -9 $BASE/logs/testrepository.subunit
|
||||||
|
sudo gzip -9 $BASE/logs/testr_results.html
|
||||||
|
sudo chown jenkins:jenkins $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
|
||||||
|
sudo chmod a+r $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
OPENSTACKCLIENT_DIR=$(cd $(dirname "$0") && pwd)
|
||||||
|
sudo chown -R jenkins:stack $OPENSTACKCLIENT_DIR
|
||||||
|
|
||||||
|
# Run tests
|
||||||
|
echo "Running openstackclient functional test suite"
|
||||||
|
set +e
|
||||||
|
|
||||||
|
# Go to the openstackclient dir
|
||||||
|
cd $OPENSTACKCLIENT_DIR
|
||||||
|
|
||||||
|
# Source environment variables to kick things off
|
||||||
|
source ~stack/devstack/openrc admin admin
|
||||||
|
echo 'Running tests with:'
|
||||||
|
env | grep OS
|
||||||
|
|
||||||
|
# Preserve env for OS_ credentials
|
||||||
|
sudo -E -H -u jenkins tox -efunctional
|
||||||
|
EXIT_CODE=$?
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Collect and parse result
|
||||||
|
generate_testr_results
|
||||||
|
exit $EXIT_CODE
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class BaseVolumeTests(test.TestCase):
|
class BaseVolumeTests(base.TestCase):
|
||||||
"""Base class for Volume functional tests. """
|
"""Base class for Volume functional tests. """
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.tests.volume.v1 import common
|
from openstackclient.tests.functional.volume.v1 import common
|
||||||
|
|
||||||
|
|
||||||
class QosTests(common.BaseVolumeTests):
|
class QosTests(common.BaseVolumeTests):
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.tests.volume.v1 import common
|
from openstackclient.tests.functional.volume.v1 import common
|
||||||
|
|
||||||
|
|
||||||
class VolumeTests(common.BaseVolumeTests):
|
class VolumeTests(common.BaseVolumeTests):
|
@ -13,7 +13,7 @@
|
|||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.tests.volume.v1 import common
|
from openstackclient.tests.functional.volume.v1 import common
|
||||||
|
|
||||||
|
|
||||||
class VolumeTypeTests(common.BaseVolumeTests):
|
class VolumeTypeTests(common.BaseVolumeTests):
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from functional.common import test
|
from openstackclient.tests.functional import base
|
||||||
|
|
||||||
|
|
||||||
class BaseVolumeTests(test.TestCase):
|
class BaseVolumeTests(base.TestCase):
|
||||||
"""Base class for Volume functional tests. """
|
"""Base class for Volume functional tests. """
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.tests.volume.v2 import common
|
from openstackclient.tests.functional.volume.v2 import common
|
||||||
|
|
||||||
|
|
||||||
class QosTests(common.BaseVolumeTests):
|
class QosTests(common.BaseVolumeTests):
|
@ -13,7 +13,7 @@
|
|||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.tests.volume.v2 import common
|
from openstackclient.tests.functional.volume.v2 import common
|
||||||
|
|
||||||
|
|
||||||
class SnapshotTests(common.BaseVolumeTests):
|
class SnapshotTests(common.BaseVolumeTests):
|
@ -13,7 +13,7 @@
|
|||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.tests.volume.v2 import common
|
from openstackclient.tests.functional.volume.v2 import common
|
||||||
|
|
||||||
|
|
||||||
class VolumeTests(common.BaseVolumeTests):
|
class VolumeTests(common.BaseVolumeTests):
|
@ -13,7 +13,7 @@
|
|||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from functional.tests.volume.v2 import common
|
from openstackclient.tests.functional.volume.v2 import common
|
||||||
|
|
||||||
|
|
||||||
class VolumeTypeTests(common.BaseVolumeTests):
|
class VolumeTypeTests(common.BaseVolumeTests):
|
2
tox.ini
2
tox.ini
@ -51,7 +51,7 @@ commands =
|
|||||||
bandit -r openstackclient -x tests -s B105,B106,B107,B401,B404,B603,B606,B607,B110,B605,B101
|
bandit -r openstackclient -x tests -s B105,B106,B107,B401,B404,B603,B606,B607,B110,B605,B101
|
||||||
|
|
||||||
[testenv:functional]
|
[testenv:functional]
|
||||||
setenv = OS_TEST_PATH=./functional/tests
|
setenv = OS_TEST_PATH=./openstackclient/tests/functional
|
||||||
passenv = OS_*
|
passenv = OS_*
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user