From c14d3efe6162a58cb3cdcb2834ad2508e2525018 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Mon, 5 Sep 2016 20:35:06 -0700 Subject: [PATCH] move all functional tests to tests module functional tests should be grouped with other tests (unit and integration tests). as part of this commit the "common" module was renamed to just "base", this was done for simplicity. the post_test_hook.sh file was also copied to the functional module since it should live there. a separate change to the infra repo will be made to call the new location, once that is merged we can remove the old one (a new change will also be posted for that) Needed-By: I49d54f009021d65c1ae49faf6b3f0a7acdadd7b3 Change-Id: Ie8c334f6223373b8e06df8bd8466500d2a2c8ede --- functional/tests/volume/v1/__init__.py | 0 functional/tests/volume/v2/__init__.py | 0 .../tests/functional}/__init__.py | 0 .../tests/functional/base.py | 0 .../tests/functional}/common/__init__.py | 0 .../common/test_availability_zone.py | 4 +- .../functional}/common/test_configuration.py | 4 +- .../tests/functional}/common/test_help.py | 4 +- .../tests/functional}/common/test_quota.py | 4 +- .../tests/functional/compute}/__init__.py | 0 .../tests/functional/compute/v2}/__init__.py | 0 .../functional}/compute/v2/test_agent.py | 4 +- .../functional}/compute/v2/test_aggregate.py | 4 +- .../functional}/compute/v2/test_flavor.py | 4 +- .../functional}/compute/v2/test_keypair.py | 4 +- .../functional}/compute/v2/test_server.py | 4 +- .../compute/v2/test_server_group.py | 4 +- .../tests/functional/examples}/__init__.py | 0 .../functional}/examples/test_examples.py | 10 ++--- .../tests/functional/identity}/__init__.py | 0 .../tests/functional/identity/v2}/__init__.py | 0 .../tests/functional}/identity/v2/common.py | 4 +- .../functional}/identity/v2/test_catalog.py | 2 +- .../identity/v2/test_ec2_credentials.py | 2 +- .../functional}/identity/v2/test_endpoint.py | 2 +- .../functional}/identity/v2/test_project.py | 2 +- .../functional}/identity/v2/test_role.py | 2 +- .../functional}/identity/v2/test_service.py | 2 +- .../functional}/identity/v2/test_token.py | 2 +- .../functional}/identity/v2/test_user.py | 2 +- .../tests/functional/identity/v3}/__init__.py | 0 .../tests/functional}/identity/v3/common.py | 4 +- .../functional}/identity/v3/test_catalog.py | 2 +- .../functional}/identity/v3/test_domain.py | 2 +- .../functional}/identity/v3/test_endpoint.py | 2 +- .../functional}/identity/v3/test_group.py | 2 +- .../tests/functional}/identity/v3/test_idp.py | 2 +- .../functional}/identity/v3/test_project.py | 2 +- .../functional}/identity/v3/test_region.py | 2 +- .../functional}/identity/v3/test_role.py | 2 +- .../functional}/identity/v3/test_service.py | 2 +- .../identity/v3/test_service_provider.py | 2 +- .../functional}/identity/v3/test_token.py | 2 +- .../functional}/identity/v3/test_user.py | 2 +- .../tests/functional/image}/__init__.py | 0 .../tests/functional/image/v1}/__init__.py | 0 .../tests/functional}/image/v1/test_image.py | 4 +- .../tests/functional/image/v2}/__init__.py | 0 .../tests/functional}/image/v2/test_image.py | 4 +- .../tests/functional/network}/__init__.py | 0 .../tests/functional/network}/v2/__init__.py | 0 .../network/v2/test_address_scope.py | 4 +- .../network/v2/test_floating_ip.py | 4 +- .../network/v2/test_ip_availability.py | 4 +- .../functional}/network/v2/test_network.py | 4 +- .../network/v2/test_network_agent.py | 4 +- .../network/v2/test_network_rbac.py | 4 +- .../network/v2/test_network_segment.py | 4 +- .../tests/functional}/network/v2/test_port.py | 4 +- .../functional}/network/v2/test_router.py | 4 +- .../network/v2/test_security_group.py | 4 +- .../network/v2/test_security_group_rule.py | 4 +- .../functional}/network/v2/test_subnet.py | 4 +- .../network/v2/test_subnet_pool.py | 4 +- .../tests/functional/object}/__init__.py | 0 .../tests/functional/object/v1}/__init__.py | 0 .../functional}/object/v1/test_container.py | 4 +- .../functional}/object/v1/test_object.py | 4 +- .../tests/functional/post_test_hook.sh | 43 +++++++++++++++++++ .../tests/functional/volume}/__init__.py | 0 .../tests/functional/volume}/v1/__init__.py | 0 .../tests/functional}/volume/v1/common.py | 4 +- .../tests/functional}/volume/v1/test_qos.py | 2 +- .../functional}/volume/v1/test_volume.py | 2 +- .../functional}/volume/v1/test_volume_type.py | 2 +- .../tests/functional/volume/v2}/__init__.py | 0 .../tests/functional}/volume/v2/common.py | 4 +- .../tests/functional}/volume/v2/test_qos.py | 2 +- .../functional}/volume/v2/test_snapshot.py | 2 +- .../functional}/volume/v2/test_volume.py | 2 +- .../functional}/volume/v2/test_volume_type.py | 2 +- tox.ini | 2 +- 82 files changed, 138 insertions(+), 95 deletions(-) delete mode 100644 functional/tests/volume/v1/__init__.py delete mode 100644 functional/tests/volume/v2/__init__.py rename {functional => openstackclient/tests/functional}/__init__.py (100%) rename functional/common/test.py => openstackclient/tests/functional/base.py (100%) rename {functional => openstackclient/tests/functional}/common/__init__.py (100%) rename {functional/tests => openstackclient/tests/functional}/common/test_availability_zone.py (91%) rename {functional/tests => openstackclient/tests/functional}/common/test_configuration.py (94%) rename {functional/tests => openstackclient/tests/functional}/common/test_help.py (97%) rename {functional/tests => openstackclient/tests/functional}/common/test_quota.py (95%) rename {functional/tests => openstackclient/tests/functional/compute}/__init__.py (100%) rename {functional/tests/common => openstackclient/tests/functional/compute/v2}/__init__.py (100%) rename {functional/tests => openstackclient/tests/functional}/compute/v2/test_agent.py (96%) rename {functional/tests => openstackclient/tests/functional}/compute/v2/test_aggregate.py (96%) rename {functional/tests => openstackclient/tests/functional}/compute/v2/test_flavor.py (96%) rename {functional/tests => openstackclient/tests/functional}/compute/v2/test_keypair.py (98%) rename {functional/tests => openstackclient/tests/functional}/compute/v2/test_server.py (99%) rename {functional/tests => openstackclient/tests/functional}/compute/v2/test_server_group.py (94%) rename {functional/tests/compute => openstackclient/tests/functional/examples}/__init__.py (100%) rename {functional/tests => openstackclient/tests/functional}/examples/test_examples.py (75%) rename {functional/tests/compute/v2 => openstackclient/tests/functional/identity}/__init__.py (100%) rename {functional/tests/examples => openstackclient/tests/functional/identity/v2}/__init__.py (100%) rename {functional/tests => openstackclient/tests/functional}/identity/v2/common.py (98%) rename {functional/tests => openstackclient/tests/functional}/identity/v2/test_catalog.py (96%) rename {functional/tests => openstackclient/tests/functional}/identity/v2/test_ec2_credentials.py (96%) rename {functional/tests => openstackclient/tests/functional}/identity/v2/test_endpoint.py (96%) rename {functional/tests => openstackclient/tests/functional}/identity/v2/test_project.py (98%) rename {functional/tests => openstackclient/tests/functional}/identity/v2/test_role.py (98%) rename {functional/tests => openstackclient/tests/functional}/identity/v2/test_service.py (96%) rename {functional/tests => openstackclient/tests/functional}/identity/v2/test_token.py (93%) rename {functional/tests => openstackclient/tests/functional}/identity/v2/test_user.py (97%) rename {functional/tests/identity => openstackclient/tests/functional/identity/v3}/__init__.py (100%) rename {functional/tests => openstackclient/tests/functional}/identity/v3/common.py (99%) rename {functional/tests => openstackclient/tests/functional}/identity/v3/test_catalog.py (97%) rename {functional/tests => openstackclient/tests/functional}/identity/v3/test_domain.py (97%) rename {functional/tests => openstackclient/tests/functional}/identity/v3/test_endpoint.py (97%) rename {functional/tests => openstackclient/tests/functional}/identity/v3/test_group.py (99%) rename {functional/tests => openstackclient/tests/functional}/identity/v3/test_idp.py (97%) rename {functional/tests => openstackclient/tests/functional}/identity/v3/test_project.py (98%) rename {functional/tests => openstackclient/tests/functional}/identity/v3/test_region.py (97%) rename {functional/tests => openstackclient/tests/functional}/identity/v3/test_role.py (98%) rename {functional/tests => openstackclient/tests/functional}/identity/v3/test_service.py (97%) rename {functional/tests => openstackclient/tests/functional}/identity/v3/test_service_provider.py (97%) rename {functional/tests => openstackclient/tests/functional}/identity/v3/test_token.py (92%) rename {functional/tests => openstackclient/tests/functional}/identity/v3/test_user.py (98%) rename {functional/tests/identity/v2 => openstackclient/tests/functional/image}/__init__.py (100%) rename {functional/tests/identity/v3 => openstackclient/tests/functional/image/v1}/__init__.py (100%) rename {functional/tests => openstackclient/tests/functional}/image/v1/test_image.py (96%) rename {functional/tests/image => openstackclient/tests/functional/image/v2}/__init__.py (100%) rename {functional/tests => openstackclient/tests/functional}/image/v2/test_image.py (97%) rename {functional/tests/image/v1 => openstackclient/tests/functional/network}/__init__.py (100%) rename {functional/tests/image => openstackclient/tests/functional/network}/v2/__init__.py (100%) rename {functional/tests => openstackclient/tests/functional}/network/v2/test_address_scope.py (95%) rename {functional/tests => openstackclient/tests/functional}/network/v2/test_floating_ip.py (95%) rename {functional/tests => openstackclient/tests/functional}/network/v2/test_ip_availability.py (95%) rename {functional/tests => openstackclient/tests/functional}/network/v2/test_network.py (95%) rename {functional/tests => openstackclient/tests/functional}/network/v2/test_network_agent.py (94%) rename {functional/tests => openstackclient/tests/functional}/network/v2/test_network_rbac.py (96%) rename {functional/tests => openstackclient/tests/functional}/network/v2/test_network_segment.py (96%) rename {functional/tests => openstackclient/tests/functional}/network/v2/test_port.py (96%) rename {functional/tests => openstackclient/tests/functional}/network/v2/test_router.py (95%) rename {functional/tests => openstackclient/tests/functional}/network/v2/test_security_group.py (95%) rename {functional/tests => openstackclient/tests/functional}/network/v2/test_security_group_rule.py (96%) rename {functional/tests => openstackclient/tests/functional}/network/v2/test_subnet.py (96%) rename {functional/tests => openstackclient/tests/functional}/network/v2/test_subnet_pool.py (95%) rename {functional/tests/network => openstackclient/tests/functional/object}/__init__.py (100%) rename {functional/tests/network/v2 => openstackclient/tests/functional/object/v1}/__init__.py (100%) rename {functional/tests => openstackclient/tests/functional}/object/v1/test_container.py (94%) rename {functional/tests => openstackclient/tests/functional}/object/v1/test_object.py (97%) create mode 100755 openstackclient/tests/functional/post_test_hook.sh rename {functional/tests/object => openstackclient/tests/functional/volume}/__init__.py (100%) rename {functional/tests/object => openstackclient/tests/functional/volume}/v1/__init__.py (100%) rename {functional/tests => openstackclient/tests/functional}/volume/v1/common.py (89%) rename {functional/tests => openstackclient/tests/functional}/volume/v1/test_qos.py (96%) rename {functional/tests => openstackclient/tests/functional}/volume/v1/test_volume.py (97%) rename {functional/tests => openstackclient/tests/functional}/volume/v1/test_volume_type.py (97%) rename {functional/tests/volume => openstackclient/tests/functional/volume/v2}/__init__.py (100%) rename {functional/tests => openstackclient/tests/functional}/volume/v2/common.py (89%) rename {functional/tests => openstackclient/tests/functional}/volume/v2/test_qos.py (97%) rename {functional/tests => openstackclient/tests/functional}/volume/v2/test_snapshot.py (98%) rename {functional/tests => openstackclient/tests/functional}/volume/v2/test_volume.py (98%) rename {functional/tests => openstackclient/tests/functional}/volume/v2/test_volume_type.py (98%) diff --git a/functional/tests/volume/v1/__init__.py b/functional/tests/volume/v1/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/functional/tests/volume/v2/__init__.py b/functional/tests/volume/v2/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/functional/__init__.py b/openstackclient/tests/functional/__init__.py similarity index 100% rename from functional/__init__.py rename to openstackclient/tests/functional/__init__.py diff --git a/functional/common/test.py b/openstackclient/tests/functional/base.py similarity index 100% rename from functional/common/test.py rename to openstackclient/tests/functional/base.py diff --git a/functional/common/__init__.py b/openstackclient/tests/functional/common/__init__.py similarity index 100% rename from functional/common/__init__.py rename to openstackclient/tests/functional/common/__init__.py diff --git a/functional/tests/common/test_availability_zone.py b/openstackclient/tests/functional/common/test_availability_zone.py similarity index 91% rename from functional/tests/common/test_availability_zone.py rename to openstackclient/tests/functional/common/test_availability_zone.py index da8aad7dd..f73e1ed95 100644 --- a/functional/tests/common/test_availability_zone.py +++ b/openstackclient/tests/functional/common/test_availability_zone.py @@ -10,10 +10,10 @@ # License for the specific language governing permissions and limitations # 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. """ HEADERS = ["'Zone Name'"] # So far, all components have the same default availability zone name. diff --git a/functional/tests/common/test_configuration.py b/openstackclient/tests/functional/common/test_configuration.py similarity index 94% rename from functional/tests/common/test_configuration.py rename to openstackclient/tests/functional/common/test_configuration.py index 801ee10df..f47d3b007 100644 --- a/functional/tests/common/test_configuration.py +++ b/openstackclient/tests/functional/common/test_configuration.py @@ -12,14 +12,14 @@ import os -from functional.common import test from openstackclient.common import configuration +from openstackclient.tests.functional import base BASIC_CONFIG_HEADERS = ['Field', 'Value'] -class ConfigurationTests(test.TestCase): +class ConfigurationTests(base.TestCase): opts = "-f value -c auth.password" diff --git a/functional/tests/common/test_help.py b/openstackclient/tests/functional/common/test_help.py similarity index 97% rename from functional/tests/common/test_help.py rename to openstackclient/tests/functional/common/test_help.py index 7601c41bb..bbc521970 100644 --- a/functional/tests/common/test_help.py +++ b/openstackclient/tests/functional/common/test_help.py @@ -10,10 +10,10 @@ # License for the specific language governing permissions and limitations # 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.""" SERVER_COMMANDS = [ diff --git a/functional/tests/common/test_quota.py b/openstackclient/tests/functional/common/test_quota.py similarity index 95% rename from functional/tests/common/test_quota.py rename to openstackclient/tests/functional/common/test_quota.py index 0316de25a..fd45be38a 100644 --- a/functional/tests/common/test_quota.py +++ b/openstackclient/tests/functional/common/test_quota.py @@ -10,10 +10,10 @@ # License for the specific language governing permissions and limitations # 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. """ # Test quota information for compute, network and volume. EXPECTED_FIELDS = ['instances', 'networks', 'volumes'] diff --git a/functional/tests/__init__.py b/openstackclient/tests/functional/compute/__init__.py similarity index 100% rename from functional/tests/__init__.py rename to openstackclient/tests/functional/compute/__init__.py diff --git a/functional/tests/common/__init__.py b/openstackclient/tests/functional/compute/v2/__init__.py similarity index 100% rename from functional/tests/common/__init__.py rename to openstackclient/tests/functional/compute/v2/__init__.py diff --git a/functional/tests/compute/v2/test_agent.py b/openstackclient/tests/functional/compute/v2/test_agent.py similarity index 96% rename from functional/tests/compute/v2/test_agent.py rename to openstackclient/tests/functional/compute/v2/test_agent.py index d432768d2..7115db1f4 100644 --- a/functional/tests/compute/v2/test_agent.py +++ b/openstackclient/tests/functional/compute/v2/test_agent.py @@ -12,10 +12,10 @@ 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.""" ID = None diff --git a/functional/tests/compute/v2/test_aggregate.py b/openstackclient/tests/functional/compute/v2/test_aggregate.py similarity index 96% rename from functional/tests/compute/v2/test_aggregate.py rename to openstackclient/tests/functional/compute/v2/test_aggregate.py index adb14e52a..2bc88e7b5 100644 --- a/functional/tests/compute/v2/test_aggregate.py +++ b/openstackclient/tests/functional/compute/v2/test_aggregate.py @@ -12,10 +12,10 @@ 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.""" NAME = uuid.uuid4().hex diff --git a/functional/tests/compute/v2/test_flavor.py b/openstackclient/tests/functional/compute/v2/test_flavor.py similarity index 96% rename from functional/tests/compute/v2/test_flavor.py rename to openstackclient/tests/functional/compute/v2/test_flavor.py index ef0d2fe36..794a6cc30 100644 --- a/functional/tests/compute/v2/test_flavor.py +++ b/openstackclient/tests/functional/compute/v2/test_flavor.py @@ -12,10 +12,10 @@ 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.""" NAME = uuid.uuid4().hex diff --git a/functional/tests/compute/v2/test_keypair.py b/openstackclient/tests/functional/compute/v2/test_keypair.py similarity index 98% rename from functional/tests/compute/v2/test_keypair.py rename to openstackclient/tests/functional/compute/v2/test_keypair.py index 6bc5cdb7c..01078c613 100644 --- a/functional/tests/compute/v2/test_keypair.py +++ b/openstackclient/tests/functional/compute/v2/test_keypair.py @@ -12,13 +12,13 @@ import tempfile -from functional.common import test +from openstackclient.tests.functional import base from tempest.lib.common.utils import data_utils from tempest.lib import exceptions -class KeypairBase(test.TestCase): +class KeypairBase(base.TestCase): """Methods for functional tests.""" def keypair_create(self, name=data_utils.rand_uuid()): diff --git a/functional/tests/compute/v2/test_server.py b/openstackclient/tests/functional/compute/v2/test_server.py similarity index 99% rename from functional/tests/compute/v2/test_server.py rename to openstackclient/tests/functional/compute/v2/test_server.py index a9d0e9c13..6eedf408a 100644 --- a/functional/tests/compute/v2/test_server.py +++ b/openstackclient/tests/functional/compute/v2/test_server.py @@ -14,11 +14,11 @@ import time from tempest.lib.common.utils import data_utils -from functional.common import test +from openstackclient.tests.functional import base from tempest.lib import exceptions -class ServerTests(test.TestCase): +class ServerTests(base.TestCase): """Functional tests for openstack server commands.""" @classmethod diff --git a/functional/tests/compute/v2/test_server_group.py b/openstackclient/tests/functional/compute/v2/test_server_group.py similarity index 94% rename from functional/tests/compute/v2/test_server_group.py rename to openstackclient/tests/functional/compute/v2/test_server_group.py index b91260523..3f0a24e5f 100644 --- a/functional/tests/compute/v2/test_server_group.py +++ b/openstackclient/tests/functional/compute/v2/test_server_group.py @@ -12,10 +12,10 @@ 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.""" NAME = uuid.uuid4().hex diff --git a/functional/tests/compute/__init__.py b/openstackclient/tests/functional/examples/__init__.py similarity index 100% rename from functional/tests/compute/__init__.py rename to openstackclient/tests/functional/examples/__init__.py diff --git a/functional/tests/examples/test_examples.py b/openstackclient/tests/functional/examples/test_examples.py similarity index 75% rename from functional/tests/examples/test_examples.py rename to openstackclient/tests/functional/examples/test_examples.py index 6e0e58672..031f036a9 100644 --- a/functional/tests/examples/test_examples.py +++ b/openstackclient/tests/functional/examples/test_examples.py @@ -10,19 +10,19 @@ # License for the specific language governing permissions and limitations # 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.""" def test_common(self): # NOTE(stevemar): If an examples has a non-zero return # 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): - 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): - test.execute('python', test.EXAMPLE_DIR + '/osc-lib.py --debug') + base.execute('python', base.EXAMPLE_DIR + '/osc-lib.py --debug') diff --git a/functional/tests/compute/v2/__init__.py b/openstackclient/tests/functional/identity/__init__.py similarity index 100% rename from functional/tests/compute/v2/__init__.py rename to openstackclient/tests/functional/identity/__init__.py diff --git a/functional/tests/examples/__init__.py b/openstackclient/tests/functional/identity/v2/__init__.py similarity index 100% rename from functional/tests/examples/__init__.py rename to openstackclient/tests/functional/identity/v2/__init__.py diff --git a/functional/tests/identity/v2/common.py b/openstackclient/tests/functional/identity/v2/common.py similarity index 98% rename from functional/tests/identity/v2/common.py rename to openstackclient/tests/functional/identity/v2/common.py index ca061a4da..b390c5bc1 100644 --- a/functional/tests/identity/v2/common.py +++ b/openstackclient/tests/functional/identity/v2/common.py @@ -14,12 +14,12 @@ import os from tempest.lib.common.utils import data_utils -from functional.common import test +from openstackclient.tests.functional import base BASIC_LIST_HEADERS = ['ID', 'Name'] -class IdentityTests(test.TestCase): +class IdentityTests(base.TestCase): """Functional tests for Identity commands. """ USER_FIELDS = ['email', 'enabled', 'id', 'name', 'project_id', diff --git a/functional/tests/identity/v2/test_catalog.py b/openstackclient/tests/functional/identity/v2/test_catalog.py similarity index 96% rename from functional/tests/identity/v2/test_catalog.py rename to openstackclient/tests/functional/identity/v2/test_catalog.py index b6291e05d..f403fbfc7 100644 --- a/functional/tests/identity/v2/test_catalog.py +++ b/openstackclient/tests/functional/identity/v2/test_catalog.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from functional.tests.identity.v2 import common +from openstackclient.tests.functional.identity.v2 import common class CatalogTests(common.IdentityTests): diff --git a/functional/tests/identity/v2/test_ec2_credentials.py b/openstackclient/tests/functional/identity/v2/test_ec2_credentials.py similarity index 96% rename from functional/tests/identity/v2/test_ec2_credentials.py rename to openstackclient/tests/functional/identity/v2/test_ec2_credentials.py index 7a8ee35d7..43dff91f2 100644 --- a/functional/tests/identity/v2/test_ec2_credentials.py +++ b/openstackclient/tests/functional/identity/v2/test_ec2_credentials.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from functional.tests.identity.v2 import common +from openstackclient.tests.functional.identity.v2 import common class EC2CredentialsTests(common.IdentityTests): diff --git a/functional/tests/identity/v2/test_endpoint.py b/openstackclient/tests/functional/identity/v2/test_endpoint.py similarity index 96% rename from functional/tests/identity/v2/test_endpoint.py rename to openstackclient/tests/functional/identity/v2/test_endpoint.py index 34888c0b5..9df5ca8aa 100644 --- a/functional/tests/identity/v2/test_endpoint.py +++ b/openstackclient/tests/functional/identity/v2/test_endpoint.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from functional.tests.identity.v2 import common +from openstackclient.tests.functional.identity.v2 import common class EndpointTests(common.IdentityTests): diff --git a/functional/tests/identity/v2/test_project.py b/openstackclient/tests/functional/identity/v2/test_project.py similarity index 98% rename from functional/tests/identity/v2/test_project.py rename to openstackclient/tests/functional/identity/v2/test_project.py index 7fb1a98de..b6222a1bb 100644 --- a/functional/tests/identity/v2/test_project.py +++ b/openstackclient/tests/functional/identity/v2/test_project.py @@ -12,7 +12,7 @@ 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): diff --git a/functional/tests/identity/v2/test_role.py b/openstackclient/tests/functional/identity/v2/test_role.py similarity index 98% rename from functional/tests/identity/v2/test_role.py rename to openstackclient/tests/functional/identity/v2/test_role.py index 0f8d5ed4b..82e19aaba 100644 --- a/functional/tests/identity/v2/test_role.py +++ b/openstackclient/tests/functional/identity/v2/test_role.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from functional.tests.identity.v2 import common +from openstackclient.tests.functional.identity.v2 import common class RoleTests(common.IdentityTests): diff --git a/functional/tests/identity/v2/test_service.py b/openstackclient/tests/functional/identity/v2/test_service.py similarity index 96% rename from functional/tests/identity/v2/test_service.py rename to openstackclient/tests/functional/identity/v2/test_service.py index 9dcb6bea0..d0e038040 100644 --- a/functional/tests/identity/v2/test_service.py +++ b/openstackclient/tests/functional/identity/v2/test_service.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from functional.tests.identity.v2 import common +from openstackclient.tests.functional.identity.v2 import common class ServiceTests(common.IdentityTests): diff --git a/functional/tests/identity/v2/test_token.py b/openstackclient/tests/functional/identity/v2/test_token.py similarity index 93% rename from functional/tests/identity/v2/test_token.py rename to openstackclient/tests/functional/identity/v2/test_token.py index ca9b7d683..f85697448 100644 --- a/functional/tests/identity/v2/test_token.py +++ b/openstackclient/tests/functional/identity/v2/test_token.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from functional.tests.identity.v2 import common +from openstackclient.tests.functional.identity.v2 import common class TokenTests(common.IdentityTests): diff --git a/functional/tests/identity/v2/test_user.py b/openstackclient/tests/functional/identity/v2/test_user.py similarity index 97% rename from functional/tests/identity/v2/test_user.py rename to openstackclient/tests/functional/identity/v2/test_user.py index ef4deface..ac609b94c 100644 --- a/functional/tests/identity/v2/test_user.py +++ b/openstackclient/tests/functional/identity/v2/test_user.py @@ -13,7 +13,7 @@ from tempest.lib.common.utils import data_utils from tempest.lib import exceptions -from functional.tests.identity.v2 import common +from openstackclient.tests.functional.identity.v2 import common class UserTests(common.IdentityTests): diff --git a/functional/tests/identity/__init__.py b/openstackclient/tests/functional/identity/v3/__init__.py similarity index 100% rename from functional/tests/identity/__init__.py rename to openstackclient/tests/functional/identity/v3/__init__.py diff --git a/functional/tests/identity/v3/common.py b/openstackclient/tests/functional/identity/v3/common.py similarity index 99% rename from functional/tests/identity/v3/common.py rename to openstackclient/tests/functional/identity/v3/common.py index 47019c5fc..5dd42e70f 100644 --- a/functional/tests/identity/v3/common.py +++ b/openstackclient/tests/functional/identity/v3/common.py @@ -14,13 +14,13 @@ import os from tempest.lib.common.utils import data_utils -from functional.common import test +from openstackclient.tests.functional import base BASIC_LIST_HEADERS = ['ID', 'Name'] -class IdentityTests(test.TestCase): +class IdentityTests(base.TestCase): """Functional tests for Identity commands. """ DOMAIN_FIELDS = ['description', 'enabled', 'id', 'name', 'links'] diff --git a/functional/tests/identity/v3/test_catalog.py b/openstackclient/tests/functional/identity/v3/test_catalog.py similarity index 97% rename from functional/tests/identity/v3/test_catalog.py rename to openstackclient/tests/functional/identity/v3/test_catalog.py index e33876b08..c8361406b 100644 --- a/functional/tests/identity/v3/test_catalog.py +++ b/openstackclient/tests/functional/identity/v3/test_catalog.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from functional.tests.identity.v3 import common +from openstackclient.tests.functional.identity.v3 import common class CatalogTests(common.IdentityTests): diff --git a/functional/tests/identity/v3/test_domain.py b/openstackclient/tests/functional/identity/v3/test_domain.py similarity index 97% rename from functional/tests/identity/v3/test_domain.py rename to openstackclient/tests/functional/identity/v3/test_domain.py index 3f514b580..d8946d1ef 100644 --- a/functional/tests/identity/v3/test_domain.py +++ b/openstackclient/tests/functional/identity/v3/test_domain.py @@ -13,7 +13,7 @@ from tempest.lib.common.utils import data_utils from tempest.lib import exceptions -from functional.tests.identity.v3 import common +from openstackclient.tests.functional.identity.v3 import common class DomainTests(common.IdentityTests): diff --git a/functional/tests/identity/v3/test_endpoint.py b/openstackclient/tests/functional/identity/v3/test_endpoint.py similarity index 97% rename from functional/tests/identity/v3/test_endpoint.py rename to openstackclient/tests/functional/identity/v3/test_endpoint.py index e0afab233..22dc1b659 100644 --- a/functional/tests/identity/v3/test_endpoint.py +++ b/openstackclient/tests/functional/identity/v3/test_endpoint.py @@ -12,7 +12,7 @@ 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): diff --git a/functional/tests/identity/v3/test_group.py b/openstackclient/tests/functional/identity/v3/test_group.py similarity index 99% rename from functional/tests/identity/v3/test_group.py rename to openstackclient/tests/functional/identity/v3/test_group.py index 350756989..704911835 100644 --- a/functional/tests/identity/v3/test_group.py +++ b/openstackclient/tests/functional/identity/v3/test_group.py @@ -12,7 +12,7 @@ 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): diff --git a/functional/tests/identity/v3/test_idp.py b/openstackclient/tests/functional/identity/v3/test_idp.py similarity index 97% rename from functional/tests/identity/v3/test_idp.py rename to openstackclient/tests/functional/identity/v3/test_idp.py index bc9690f77..f9d8cb803 100644 --- a/functional/tests/identity/v3/test_idp.py +++ b/openstackclient/tests/functional/identity/v3/test_idp.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # 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 diff --git a/functional/tests/identity/v3/test_project.py b/openstackclient/tests/functional/identity/v3/test_project.py similarity index 98% rename from functional/tests/identity/v3/test_project.py rename to openstackclient/tests/functional/identity/v3/test_project.py index a27c58fb4..774388419 100644 --- a/functional/tests/identity/v3/test_project.py +++ b/openstackclient/tests/functional/identity/v3/test_project.py @@ -12,7 +12,7 @@ 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): diff --git a/functional/tests/identity/v3/test_region.py b/openstackclient/tests/functional/identity/v3/test_region.py similarity index 97% rename from functional/tests/identity/v3/test_region.py rename to openstackclient/tests/functional/identity/v3/test_region.py index 2ebc0e597..2a402bd1a 100644 --- a/functional/tests/identity/v3/test_region.py +++ b/openstackclient/tests/functional/identity/v3/test_region.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from functional.tests.identity.v3 import common +from openstackclient.tests.functional.identity.v3 import common class RegionTests(common.IdentityTests): diff --git a/functional/tests/identity/v3/test_role.py b/openstackclient/tests/functional/identity/v3/test_role.py similarity index 98% rename from functional/tests/identity/v3/test_role.py rename to openstackclient/tests/functional/identity/v3/test_role.py index 60aaf3f45..ab8af9c04 100644 --- a/functional/tests/identity/v3/test_role.py +++ b/openstackclient/tests/functional/identity/v3/test_role.py @@ -12,7 +12,7 @@ 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): diff --git a/functional/tests/identity/v3/test_service.py b/openstackclient/tests/functional/identity/v3/test_service.py similarity index 97% rename from functional/tests/identity/v3/test_service.py rename to openstackclient/tests/functional/identity/v3/test_service.py index 79a63dc8a..1ecda45af 100644 --- a/functional/tests/identity/v3/test_service.py +++ b/openstackclient/tests/functional/identity/v3/test_service.py @@ -12,7 +12,7 @@ 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): diff --git a/functional/tests/identity/v3/test_service_provider.py b/openstackclient/tests/functional/identity/v3/test_service_provider.py similarity index 97% rename from functional/tests/identity/v3/test_service_provider.py rename to openstackclient/tests/functional/identity/v3/test_service_provider.py index 458c2ae65..e072bc93b 100644 --- a/functional/tests/identity/v3/test_service_provider.py +++ b/openstackclient/tests/functional/identity/v3/test_service_provider.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # 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 diff --git a/functional/tests/identity/v3/test_token.py b/openstackclient/tests/functional/identity/v3/test_token.py similarity index 92% rename from functional/tests/identity/v3/test_token.py rename to openstackclient/tests/functional/identity/v3/test_token.py index d8d3f43d6..62e90003f 100644 --- a/functional/tests/identity/v3/test_token.py +++ b/openstackclient/tests/functional/identity/v3/test_token.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from functional.tests.identity.v3 import common +from openstackclient.tests.functional.identity.v3 import common class TokenTests(common.IdentityTests): diff --git a/functional/tests/identity/v3/test_user.py b/openstackclient/tests/functional/identity/v3/test_user.py similarity index 98% rename from functional/tests/identity/v3/test_user.py rename to openstackclient/tests/functional/identity/v3/test_user.py index f3657064c..9e9bde96c 100644 --- a/functional/tests/identity/v3/test_user.py +++ b/openstackclient/tests/functional/identity/v3/test_user.py @@ -12,7 +12,7 @@ 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): diff --git a/functional/tests/identity/v2/__init__.py b/openstackclient/tests/functional/image/__init__.py similarity index 100% rename from functional/tests/identity/v2/__init__.py rename to openstackclient/tests/functional/image/__init__.py diff --git a/functional/tests/identity/v3/__init__.py b/openstackclient/tests/functional/image/v1/__init__.py similarity index 100% rename from functional/tests/identity/v3/__init__.py rename to openstackclient/tests/functional/image/v1/__init__.py diff --git a/functional/tests/image/v1/test_image.py b/openstackclient/tests/functional/image/v1/test_image.py similarity index 96% rename from functional/tests/image/v1/test_image.py rename to openstackclient/tests/functional/image/v1/test_image.py index c64c0d986..2a2b5734b 100644 --- a/functional/tests/image/v1/test_image.py +++ b/openstackclient/tests/functional/image/v1/test_image.py @@ -13,10 +13,10 @@ import os 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. """ NAME = uuid.uuid4().hex diff --git a/functional/tests/image/__init__.py b/openstackclient/tests/functional/image/v2/__init__.py similarity index 100% rename from functional/tests/image/__init__.py rename to openstackclient/tests/functional/image/v2/__init__.py diff --git a/functional/tests/image/v2/test_image.py b/openstackclient/tests/functional/image/v2/test_image.py similarity index 97% rename from functional/tests/image/v2/test_image.py rename to openstackclient/tests/functional/image/v2/test_image.py index 809451bb7..3f432b02e 100644 --- a/functional/tests/image/v2/test_image.py +++ b/openstackclient/tests/functional/image/v2/test_image.py @@ -13,10 +13,10 @@ import os 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. """ NAME = uuid.uuid4().hex diff --git a/functional/tests/image/v1/__init__.py b/openstackclient/tests/functional/network/__init__.py similarity index 100% rename from functional/tests/image/v1/__init__.py rename to openstackclient/tests/functional/network/__init__.py diff --git a/functional/tests/image/v2/__init__.py b/openstackclient/tests/functional/network/v2/__init__.py similarity index 100% rename from functional/tests/image/v2/__init__.py rename to openstackclient/tests/functional/network/v2/__init__.py diff --git a/functional/tests/network/v2/test_address_scope.py b/openstackclient/tests/functional/network/v2/test_address_scope.py similarity index 95% rename from functional/tests/network/v2/test_address_scope.py rename to openstackclient/tests/functional/network/v2/test_address_scope.py index 3beab2338..ef4b57560 100644 --- a/functional/tests/network/v2/test_address_scope.py +++ b/openstackclient/tests/functional/network/v2/test_address_scope.py @@ -12,10 +12,10 @@ 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. """ NAME = uuid.uuid4().hex HEADERS = ['Name'] diff --git a/functional/tests/network/v2/test_floating_ip.py b/openstackclient/tests/functional/network/v2/test_floating_ip.py similarity index 95% rename from functional/tests/network/v2/test_floating_ip.py rename to openstackclient/tests/functional/network/v2/test_floating_ip.py index 7e7c63f4d..f3a1971f7 100644 --- a/functional/tests/network/v2/test_floating_ip.py +++ b/openstackclient/tests/functional/network/v2/test_floating_ip.py @@ -12,10 +12,10 @@ 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. """ SUBNET_NAME = uuid.uuid4().hex NETWORK_NAME = uuid.uuid4().hex diff --git a/functional/tests/network/v2/test_ip_availability.py b/openstackclient/tests/functional/network/v2/test_ip_availability.py similarity index 95% rename from functional/tests/network/v2/test_ip_availability.py rename to openstackclient/tests/functional/network/v2/test_ip_availability.py index e83010fde..b5c908f44 100644 --- a/functional/tests/network/v2/test_ip_availability.py +++ b/openstackclient/tests/functional/network/v2/test_ip_availability.py @@ -12,10 +12,10 @@ 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. """ NAME = uuid.uuid4().hex NETWORK_NAME = uuid.uuid4().hex diff --git a/functional/tests/network/v2/test_network.py b/openstackclient/tests/functional/network/v2/test_network.py similarity index 95% rename from functional/tests/network/v2/test_network.py rename to openstackclient/tests/functional/network/v2/test_network.py index f5c92faad..c77ff642c 100644 --- a/functional/tests/network/v2/test_network.py +++ b/openstackclient/tests/functional/network/v2/test_network.py @@ -12,10 +12,10 @@ 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. """ NAME = uuid.uuid4().hex HEADERS = ['Name'] diff --git a/functional/tests/network/v2/test_network_agent.py b/openstackclient/tests/functional/network/v2/test_network_agent.py similarity index 94% rename from functional/tests/network/v2/test_network_agent.py rename to openstackclient/tests/functional/network/v2/test_network_agent.py index f574c50c9..dd6112e72 100644 --- a/functional/tests/network/v2/test_network_agent.py +++ b/openstackclient/tests/functional/network/v2/test_network_agent.py @@ -10,10 +10,10 @@ # License for the specific language governing permissions and limitations # 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. """ IDs = None HEADERS = ['ID'] diff --git a/functional/tests/network/v2/test_network_rbac.py b/openstackclient/tests/functional/network/v2/test_network_rbac.py similarity index 96% rename from functional/tests/network/v2/test_network_rbac.py rename to openstackclient/tests/functional/network/v2/test_network_rbac.py index 1dbc246bf..6f9f05e79 100644 --- a/functional/tests/network/v2/test_network_rbac.py +++ b/openstackclient/tests/functional/network/v2/test_network_rbac.py @@ -12,10 +12,10 @@ 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. """ NET_NAME = uuid.uuid4().hex PROJECT_NAME = uuid.uuid4().hex diff --git a/functional/tests/network/v2/test_network_segment.py b/openstackclient/tests/functional/network/v2/test_network_segment.py similarity index 96% rename from functional/tests/network/v2/test_network_segment.py rename to openstackclient/tests/functional/network/v2/test_network_segment.py index 4609973cf..f871e88e1 100644 --- a/functional/tests/network/v2/test_network_segment.py +++ b/openstackclient/tests/functional/network/v2/test_network_segment.py @@ -13,12 +13,12 @@ import testtools 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. @testtools.skip("bp/routed-networks") -class NetworkSegmentTests(test.TestCase): +class NetworkSegmentTests(base.TestCase): """Functional tests for network segment. """ NETWORK_NAME = uuid.uuid4().hex PHYSICAL_NETWORK_NAME = uuid.uuid4().hex diff --git a/functional/tests/network/v2/test_port.py b/openstackclient/tests/functional/network/v2/test_port.py similarity index 96% rename from functional/tests/network/v2/test_port.py rename to openstackclient/tests/functional/network/v2/test_port.py index a68019c45..decd9553d 100644 --- a/functional/tests/network/v2/test_port.py +++ b/openstackclient/tests/functional/network/v2/test_port.py @@ -12,10 +12,10 @@ 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. """ NAME = uuid.uuid4().hex NETWORK_NAME = uuid.uuid4().hex diff --git a/functional/tests/network/v2/test_router.py b/openstackclient/tests/functional/network/v2/test_router.py similarity index 95% rename from functional/tests/network/v2/test_router.py rename to openstackclient/tests/functional/network/v2/test_router.py index e536c64ec..789c38254 100644 --- a/functional/tests/network/v2/test_router.py +++ b/openstackclient/tests/functional/network/v2/test_router.py @@ -12,10 +12,10 @@ 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. """ NAME = uuid.uuid4().hex HEADERS = ['Name'] diff --git a/functional/tests/network/v2/test_security_group.py b/openstackclient/tests/functional/network/v2/test_security_group.py similarity index 95% rename from functional/tests/network/v2/test_security_group.py rename to openstackclient/tests/functional/network/v2/test_security_group.py index 2a3b92a0d..debd81df6 100644 --- a/functional/tests/network/v2/test_security_group.py +++ b/openstackclient/tests/functional/network/v2/test_security_group.py @@ -12,10 +12,10 @@ 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. """ NAME = uuid.uuid4().hex OTHER_NAME = uuid.uuid4().hex diff --git a/functional/tests/network/v2/test_security_group_rule.py b/openstackclient/tests/functional/network/v2/test_security_group_rule.py similarity index 96% rename from functional/tests/network/v2/test_security_group_rule.py rename to openstackclient/tests/functional/network/v2/test_security_group_rule.py index 248d20b1f..c91de1a57 100644 --- a/functional/tests/network/v2/test_security_group_rule.py +++ b/openstackclient/tests/functional/network/v2/test_security_group_rule.py @@ -12,10 +12,10 @@ 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. """ SECURITY_GROUP_NAME = uuid.uuid4().hex SECURITY_GROUP_RULE_ID = None diff --git a/functional/tests/network/v2/test_subnet.py b/openstackclient/tests/functional/network/v2/test_subnet.py similarity index 96% rename from functional/tests/network/v2/test_subnet.py rename to openstackclient/tests/functional/network/v2/test_subnet.py index 7fb48437d..231671f31 100644 --- a/functional/tests/network/v2/test_subnet.py +++ b/openstackclient/tests/functional/network/v2/test_subnet.py @@ -12,10 +12,10 @@ 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. """ NAME = uuid.uuid4().hex NETWORK_NAME = uuid.uuid4().hex diff --git a/functional/tests/network/v2/test_subnet_pool.py b/openstackclient/tests/functional/network/v2/test_subnet_pool.py similarity index 95% rename from functional/tests/network/v2/test_subnet_pool.py rename to openstackclient/tests/functional/network/v2/test_subnet_pool.py index 054188f71..e52f06fc5 100644 --- a/functional/tests/network/v2/test_subnet_pool.py +++ b/openstackclient/tests/functional/network/v2/test_subnet_pool.py @@ -12,10 +12,10 @@ 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. """ NAME = uuid.uuid4().hex CREATE_POOL_PREFIX = '10.100.0.0/24' diff --git a/functional/tests/network/__init__.py b/openstackclient/tests/functional/object/__init__.py similarity index 100% rename from functional/tests/network/__init__.py rename to openstackclient/tests/functional/object/__init__.py diff --git a/functional/tests/network/v2/__init__.py b/openstackclient/tests/functional/object/v1/__init__.py similarity index 100% rename from functional/tests/network/v2/__init__.py rename to openstackclient/tests/functional/object/v1/__init__.py diff --git a/functional/tests/object/v1/test_container.py b/openstackclient/tests/functional/object/v1/test_container.py similarity index 94% rename from functional/tests/object/v1/test_container.py rename to openstackclient/tests/functional/object/v1/test_container.py index 4f9e843b5..af76efd96 100644 --- a/functional/tests/object/v1/test_container.py +++ b/openstackclient/tests/functional/object/v1/test_container.py @@ -12,10 +12,10 @@ 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. """ NAME = uuid.uuid4().hex diff --git a/functional/tests/object/v1/test_object.py b/openstackclient/tests/functional/object/v1/test_object.py similarity index 97% rename from functional/tests/object/v1/test_object.py rename to openstackclient/tests/functional/object/v1/test_object.py index 8ea16da78..776cf47c2 100644 --- a/functional/tests/object/v1/test_object.py +++ b/openstackclient/tests/functional/object/v1/test_object.py @@ -14,14 +14,14 @@ import os import tempfile import uuid -from functional.common import test +from openstackclient.tests.functional import base BASIC_LIST_HEADERS = ['Name'] CONTAINER_FIELDS = ['account', 'container', 'x-trans-id'] OBJECT_FIELDS = ['object', 'container', 'etag'] -class ObjectTests(test.TestCase): +class ObjectTests(base.TestCase): """Functional tests for Object commands. """ CONTAINER_NAME = uuid.uuid4().hex diff --git a/openstackclient/tests/functional/post_test_hook.sh b/openstackclient/tests/functional/post_test_hook.sh new file mode 100755 index 000000000..e555470d1 --- /dev/null +++ b/openstackclient/tests/functional/post_test_hook.sh @@ -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 diff --git a/functional/tests/object/__init__.py b/openstackclient/tests/functional/volume/__init__.py similarity index 100% rename from functional/tests/object/__init__.py rename to openstackclient/tests/functional/volume/__init__.py diff --git a/functional/tests/object/v1/__init__.py b/openstackclient/tests/functional/volume/v1/__init__.py similarity index 100% rename from functional/tests/object/v1/__init__.py rename to openstackclient/tests/functional/volume/v1/__init__.py diff --git a/functional/tests/volume/v1/common.py b/openstackclient/tests/functional/volume/v1/common.py similarity index 89% rename from functional/tests/volume/v1/common.py rename to openstackclient/tests/functional/volume/v1/common.py index 7d35ed5e6..a442850da 100644 --- a/functional/tests/volume/v1/common.py +++ b/openstackclient/tests/functional/volume/v1/common.py @@ -12,10 +12,10 @@ 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. """ @classmethod diff --git a/functional/tests/volume/v1/test_qos.py b/openstackclient/tests/functional/volume/v1/test_qos.py similarity index 96% rename from functional/tests/volume/v1/test_qos.py rename to openstackclient/tests/functional/volume/v1/test_qos.py index 5aed4bd0b..770d5acbd 100644 --- a/functional/tests/volume/v1/test_qos.py +++ b/openstackclient/tests/functional/volume/v1/test_qos.py @@ -12,7 +12,7 @@ import uuid -from functional.tests.volume.v1 import common +from openstackclient.tests.functional.volume.v1 import common class QosTests(common.BaseVolumeTests): diff --git a/functional/tests/volume/v1/test_volume.py b/openstackclient/tests/functional/volume/v1/test_volume.py similarity index 97% rename from functional/tests/volume/v1/test_volume.py rename to openstackclient/tests/functional/volume/v1/test_volume.py index 8275bf0a9..6ac7f2bf7 100644 --- a/functional/tests/volume/v1/test_volume.py +++ b/openstackclient/tests/functional/volume/v1/test_volume.py @@ -12,7 +12,7 @@ import uuid -from functional.tests.volume.v1 import common +from openstackclient.tests.functional.volume.v1 import common class VolumeTests(common.BaseVolumeTests): diff --git a/functional/tests/volume/v1/test_volume_type.py b/openstackclient/tests/functional/volume/v1/test_volume_type.py similarity index 97% rename from functional/tests/volume/v1/test_volume_type.py rename to openstackclient/tests/functional/volume/v1/test_volume_type.py index ed44f3c3c..538545abc 100644 --- a/functional/tests/volume/v1/test_volume_type.py +++ b/openstackclient/tests/functional/volume/v1/test_volume_type.py @@ -13,7 +13,7 @@ import time import uuid -from functional.tests.volume.v1 import common +from openstackclient.tests.functional.volume.v1 import common class VolumeTypeTests(common.BaseVolumeTests): diff --git a/functional/tests/volume/__init__.py b/openstackclient/tests/functional/volume/v2/__init__.py similarity index 100% rename from functional/tests/volume/__init__.py rename to openstackclient/tests/functional/volume/v2/__init__.py diff --git a/functional/tests/volume/v2/common.py b/openstackclient/tests/functional/volume/v2/common.py similarity index 89% rename from functional/tests/volume/v2/common.py rename to openstackclient/tests/functional/volume/v2/common.py index 8652c2d18..e279a6f6c 100644 --- a/functional/tests/volume/v2/common.py +++ b/openstackclient/tests/functional/volume/v2/common.py @@ -12,10 +12,10 @@ 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. """ @classmethod diff --git a/functional/tests/volume/v2/test_qos.py b/openstackclient/tests/functional/volume/v2/test_qos.py similarity index 97% rename from functional/tests/volume/v2/test_qos.py rename to openstackclient/tests/functional/volume/v2/test_qos.py index 5311b478d..a54acbfd4 100644 --- a/functional/tests/volume/v2/test_qos.py +++ b/openstackclient/tests/functional/volume/v2/test_qos.py @@ -12,7 +12,7 @@ import uuid -from functional.tests.volume.v2 import common +from openstackclient.tests.functional.volume.v2 import common class QosTests(common.BaseVolumeTests): diff --git a/functional/tests/volume/v2/test_snapshot.py b/openstackclient/tests/functional/volume/v2/test_snapshot.py similarity index 98% rename from functional/tests/volume/v2/test_snapshot.py rename to openstackclient/tests/functional/volume/v2/test_snapshot.py index 4f910830a..4582b67da 100644 --- a/functional/tests/volume/v2/test_snapshot.py +++ b/openstackclient/tests/functional/volume/v2/test_snapshot.py @@ -13,7 +13,7 @@ import time import uuid -from functional.tests.volume.v2 import common +from openstackclient.tests.functional.volume.v2 import common class SnapshotTests(common.BaseVolumeTests): diff --git a/functional/tests/volume/v2/test_volume.py b/openstackclient/tests/functional/volume/v2/test_volume.py similarity index 98% rename from functional/tests/volume/v2/test_volume.py rename to openstackclient/tests/functional/volume/v2/test_volume.py index 02324a1e4..73273573a 100644 --- a/functional/tests/volume/v2/test_volume.py +++ b/openstackclient/tests/functional/volume/v2/test_volume.py @@ -13,7 +13,7 @@ import time import uuid -from functional.tests.volume.v2 import common +from openstackclient.tests.functional.volume.v2 import common class VolumeTests(common.BaseVolumeTests): diff --git a/functional/tests/volume/v2/test_volume_type.py b/openstackclient/tests/functional/volume/v2/test_volume_type.py similarity index 98% rename from functional/tests/volume/v2/test_volume_type.py rename to openstackclient/tests/functional/volume/v2/test_volume_type.py index 02f790ec5..b62cbb390 100644 --- a/functional/tests/volume/v2/test_volume_type.py +++ b/openstackclient/tests/functional/volume/v2/test_volume_type.py @@ -13,7 +13,7 @@ import time import uuid -from functional.tests.volume.v2 import common +from openstackclient.tests.functional.volume.v2 import common class VolumeTypeTests(common.BaseVolumeTests): diff --git a/tox.ini b/tox.ini index 9eb0a1a0a..af7120e11 100644 --- a/tox.ini +++ b/tox.ini @@ -51,7 +51,7 @@ commands = bandit -r openstackclient -x tests -s B105,B106,B107,B401,B404,B603,B606,B607,B110,B605,B101 [testenv:functional] -setenv = OS_TEST_PATH=./functional/tests +setenv = OS_TEST_PATH=./openstackclient/tests/functional passenv = OS_* [testenv:venv]