diff --git a/functional/tests/volume/v1/__init__.py b/functional/tests/volume/v1/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/functional/tests/volume/v2/__init__.py b/functional/tests/volume/v2/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 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 da8aad7ddd..f73e1ed956 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 801ee10dfc..f47d3b0078 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 7601c41bb9..bbc521970e 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 0316de25a7..fd45be38ab 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 d432768d2c..7115db1f4f 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 adb14e52ad..2bc88e7b59 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 ef0d2fe366..794a6cc30f 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 6bc5cdb7c1..01078c6136 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 a9d0e9c132..6eedf408a6 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 b91260523d..3f0a24e5f9 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 6e0e586724..031f036a98 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 ca061a4dac..b390c5bc15 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 b6291e05d1..f403fbfc7b 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 7a8ee35d7e..43dff91f2f 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 34888c0b50..9df5ca8aa3 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 7fb1a98de0..b6222a1bbf 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 0f8d5ed4b8..82e19aaba9 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 9dcb6bea07..d0e0380404 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 ca9b7d683b..f856974484 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 ef4deface2..ac609b94c7 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 47019c5fc8..5dd42e70f8 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 e33876b083..c8361406bb 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 3f514b580b..d8946d1ef6 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 e0afab2333..22dc1b659e 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 350756989f..7049118359 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 bc9690f77e..f9d8cb8031 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 a27c58fb49..7743884195 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 2ebc0e597d..2a402bd1a8 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 60aaf3f457..ab8af9c04e 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 79a63dc8a8..1ecda45af2 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 458c2ae65e..e072bc93b1 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 d8d3f43d66..62e90003fc 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 f3657064c9..9e9bde96c0 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 c64c0d986b..2a2b5734bc 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 809451bb74..3f432b02ee 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 3beab2338f..ef4b575609 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 7e7c63f4d4..f3a1971f79 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 e83010fded..b5c908f44d 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 f5c92faadc..c77ff642c5 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 f574c50c94..dd6112e72e 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 1dbc246bf2..6f9f05e792 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 4609973cf4..f871e88e18 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 a68019c45b..decd9553dc 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 e536c64ec7..789c382548 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 2a3b92a0d3..debd81df6e 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 248d20b1fb..c91de1a570 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 7fb48437d9..231671f31d 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 054188f714..e52f06fc5d 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 4f9e843b5c..af76efd96c 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 8ea16da785..776cf47c2c 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 0000000000..e555470d17 --- /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 7d35ed5e6d..a442850daa 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 5aed4bd0b5..770d5acbd8 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 8275bf0a96..6ac7f2bf71 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 ed44f3c3cc..538545abc6 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 8652c2d182..e279a6f6ca 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 5311b478d3..a54acbfd47 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 4f910830a7..4582b67dac 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 02324a1e43..73273573a9 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 02f790ec50..b62cbb3908 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 9eb0a1a0af..af7120e11e 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]