diff --git a/contrib/ci/post_test_hook.sh b/contrib/ci/post_test_hook.sh index aa19abff41..65822ad81b 100755 --- a/contrib/ci/post_test_hook.sh +++ b/contrib/ci/post_test_hook.sh @@ -89,11 +89,11 @@ set +o errexit cd $BASE/new/tempest export MANILA_TEMPEST_CONCURRENCY=${MANILA_TEMPEST_CONCURRENCY:-12} -export MANILA_TESTS=${MANILA_TESTS:-'tempest.api.share*'} +export MANILA_TESTS=${MANILA_TESTS:-'manila_tempest_tests.tests.api'} if [[ "$JOB_NAME" =~ "scenario" ]]; then echo "Set test set to scenario only" - MANILA_TESTS='tempest.scenario.*share*' + MANILA_TESTS='manila_tempest_tests.tests.scenario' elif [[ "$JOB_NAME" =~ "no-share-servers" ]]; then # Using approach without handling of share servers we have bigger load for # volume creation in Cinder using Generic driver. So, reduce amount of @@ -102,5 +102,8 @@ elif [[ "$JOB_NAME" =~ "no-share-servers" ]]; then MANILA_TEMPEST_CONCURRENCY=8 fi +# check if tempest plugin was installed corretly +echo 'import pkg_resources; print list(pkg_resources.iter_entry_points("tempest.test_plugins"))' | python + echo "Running tempest manila test suites" -sudo -H -u jenkins tox -eall $MANILA_TESTS -- --concurrency=$MANILA_TEMPEST_CONCURRENCY +sudo -H -u jenkins tox -eall-plugin $MANILA_TESTS -- --concurrency=$MANILA_TEMPEST_CONCURRENCY diff --git a/contrib/ci/pre_test_hook.sh b/contrib/ci/pre_test_hook.sh index 936f414f18..4b235cb350 100755 --- a/contrib/ci/pre_test_hook.sh +++ b/contrib/ci/pre_test_hook.sh @@ -55,14 +55,13 @@ fi # created vm's in scenario tests. echo 'ENABLE_ISOLATED_METADATA=True' >> $localrc_path + # Go to Tempest dir and checkout stable commit to avoid possible # incompatibilities for plugin stored in Manila repo. -TEMPEST_COMMIT="489f5e62" # 15 June, 2015 +TEMPEST_COMMIT="3b1bb9be3265f" # 28 Aug, 2015 cd $BASE/new/tempest git checkout $TEMPEST_COMMIT # Print current Tempest status git status -# Install Manila Tempest integration -cp -r $BASE/new/manila/contrib/tempest/tempest/* $BASE/new/tempest/tempest diff --git a/contrib/tempest/README.rst b/contrib/tempest/README.rst deleted file mode 100644 index 0fb7306c6e..0000000000 --- a/contrib/tempest/README.rst +++ /dev/null @@ -1,20 +0,0 @@ -==================== -Tempest Integration -==================== - -This directory contains the files necessary for tempest to cover Manila project. - -To install: - - $ TEMPEST_DIR= - $ TEMPEST_COMMIT= - $ cd ${TEMPEST_DIR} - $ git checkout ${TEMPEST_COMMIT} - $ cd - - $ cp -r tempest ${TEMPEST_DIR} - -Notes ------ - -These are pluggable-like files to Tempest project without requirement to change core Tempest files. But, due to constant changes of Tempest and absence of sync it can become incompatible with some states of Tempest. So, please look at file `contrib/ci/pre_test_hook.sh` where you can find commit that is used as HEAD of Tempest master branch. - diff --git a/manila/hacking/checks.py b/manila/hacking/checks.py index cc20137f48..a19b19a03b 100644 --- a/manila/hacking/checks.py +++ b/manila/hacking/checks.py @@ -120,7 +120,7 @@ def no_translate_debug_logs(logical_line, filename): def validate_log_translations(logical_line, physical_line, filename): # Translations are not required in the test and tempest # directories. - if ("manila/tests" in filename or + if ("manila/tests" in filename or "manila_tempest_tests" in filename or "contrib/tempest" in filename): return if pep8.noqa(physical_line): diff --git a/manila_tempest_tests/README.rst b/manila_tempest_tests/README.rst new file mode 100644 index 0000000000..7569d9610e --- /dev/null +++ b/manila_tempest_tests/README.rst @@ -0,0 +1,6 @@ +==================== +Tempest Integration +==================== + +This directory contains Tempest tests to cover Manila project. + diff --git a/contrib/tempest/tempest/api/share/__init__.py b/manila_tempest_tests/__init__.py similarity index 100% rename from contrib/tempest/tempest/api/share/__init__.py rename to manila_tempest_tests/__init__.py diff --git a/contrib/tempest/tempest/clients_share.py b/manila_tempest_tests/clients_share.py similarity index 95% rename from contrib/tempest/tempest/clients_share.py rename to manila_tempest_tests/clients_share.py index f049b7e218..1411286acc 100644 --- a/contrib/tempest/tempest/clients_share.py +++ b/manila_tempest_tests/clients_share.py @@ -15,7 +15,8 @@ from tempest import clients from tempest.common import cred_provider -from tempest.services.share.json import shares_client + +from manila_tempest_tests.services.share.json import shares_client class Manager(clients.Manager): diff --git a/contrib/tempest/tempest/config_share.py b/manila_tempest_tests/config.py similarity index 93% rename from contrib/tempest/tempest/config_share.py rename to manila_tempest_tests/config.py index 6a82221d79..f6962ea467 100644 --- a/contrib/tempest/tempest/config_share.py +++ b/manila_tempest_tests/config.py @@ -152,20 +152,3 @@ ShareGroup = [ default="100", help="Flavor used for client vm in scenario tests."), ] - - -class TempestConfigProxyManila(object): - """Wrapper over standard Tempest config that sets Manila opts.""" - - def __init__(self): - self._config = config.CONF - config.register_opt_group( - cfg.CONF, service_available_group, ServiceAvailableGroup) - config.register_opt_group(cfg.CONF, share_group, ShareGroup) - self._config.share = cfg.CONF.share - - def __getattr__(self, attr): - return getattr(self._config, attr) - - -CONF = TempestConfigProxyManila() diff --git a/manila_tempest_tests/plugin.py b/manila_tempest_tests/plugin.py new file mode 100644 index 0000000000..3a8550b6de --- /dev/null +++ b/manila_tempest_tests/plugin.py @@ -0,0 +1,41 @@ +# Copyright 2015 Deutsche Telekom AG +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +import os + +from tempest import config +from tempest.test_discover import plugins + +from manila_tempest_tests import config as config_share + + +class ManilaTempestPlugin(plugins.TempestPlugin): + def load_tests(self): + base_path = os.path.split(os.path.dirname( + os.path.abspath(__file__)))[0] + test_dir = "manila_tempest_tests/tests" + full_test_dir = os.path.join(base_path, test_dir) + return full_test_dir, base_path + + def register_opts(self, conf): + config.register_opt_group( + conf, config_share.service_available_group, + config_share.ServiceAvailableGroup) + config.register_opt_group(conf, config_share.share_group, + config_share.ShareGroup) + + def get_opt_lists(self): + return [(config_share.share_group.name, config_share.ShareGroup)] diff --git a/contrib/tempest/tempest/api/share/admin/__init__.py b/manila_tempest_tests/services/__init__.py similarity index 100% rename from contrib/tempest/tempest/api/share/admin/__init__.py rename to manila_tempest_tests/services/__init__.py diff --git a/contrib/tempest/tempest/services/share/__init__.py b/manila_tempest_tests/services/share/__init__.py similarity index 100% rename from contrib/tempest/tempest/services/share/__init__.py rename to manila_tempest_tests/services/share/__init__.py diff --git a/contrib/tempest/tempest/services/share/json/__init__.py b/manila_tempest_tests/services/share/json/__init__.py similarity index 100% rename from contrib/tempest/tempest/services/share/json/__init__.py rename to manila_tempest_tests/services/share/json/__init__.py diff --git a/contrib/tempest/tempest/services/share/json/shares_client.py b/manila_tempest_tests/services/share/json/shares_client.py similarity index 99% rename from contrib/tempest/tempest/services/share/json/shares_client.py rename to manila_tempest_tests/services/share/json/shares_client.py index b72114c6a8..fcfd5eaf55 100644 --- a/contrib/tempest/tempest/services/share/json/shares_client.py +++ b/manila_tempest_tests/services/share/json/shares_client.py @@ -18,12 +18,12 @@ import time import urllib import six +from tempest import config # noqa from tempest_lib.common import rest_client from tempest_lib.common.utils import data_utils from tempest_lib import exceptions -from tempest import config_share as config # noqa -from tempest import share_exceptions # noqa +from manila_tempest_tests import share_exceptions CONF = config.CONF diff --git a/contrib/tempest/tempest/share_exceptions.py b/manila_tempest_tests/share_exceptions.py similarity index 100% rename from contrib/tempest/tempest/share_exceptions.py rename to manila_tempest_tests/share_exceptions.py diff --git a/manila_tempest_tests/tests/__init__.py b/manila_tempest_tests/tests/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/manila_tempest_tests/tests/api/__init__.py b/manila_tempest_tests/tests/api/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/manila_tempest_tests/tests/api/admin/__init__.py b/manila_tempest_tests/tests/api/admin/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/contrib/tempest/tempest/api/share/admin/test_admin_actions.py b/manila_tempest_tests/tests/api/admin/test_admin_actions.py similarity index 97% rename from contrib/tempest/tempest/api/share/admin/test_admin_actions.py rename to manila_tempest_tests/tests/api/admin/test_admin_actions.py index 97a698e3e8..6acec11f7f 100644 --- a/contrib/tempest/tempest/api/share/admin/test_admin_actions.py +++ b/manila_tempest_tests/tests/api/admin/test_admin_actions.py @@ -13,11 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa import testtools # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base + CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/admin/test_admin_actions_negative.py b/manila_tempest_tests/tests/api/admin/test_admin_actions_negative.py similarity index 97% rename from contrib/tempest/tempest/api/share/admin/test_admin_actions_negative.py rename to manila_tempest_tests/tests/api/admin/test_admin_actions_negative.py index 2796cfa1a6..7df3b30ec3 100644 --- a/contrib/tempest/tempest/api/share/admin/test_admin_actions_negative.py +++ b/manila_tempest_tests/tests/api/admin/test_admin_actions_negative.py @@ -13,13 +13,13 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa import testtools # noqa -from tempest.api.share import base -from tempest import clients_share as clients -from tempest import config_share as config -from tempest import test +from manila_tempest_tests import clients_share as clients +from manila_tempest_tests.tests.api import base CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/admin/test_multi_backend.py b/manila_tempest_tests/tests/api/admin/test_multi_backend.py similarity index 97% rename from contrib/tempest/tempest/api/share/admin/test_multi_backend.py rename to manila_tempest_tests/tests/api/admin/test_multi_backend.py index 8f271ebc06..ab57d7fa1a 100644 --- a/contrib/tempest/tempest/api/share/admin/test_multi_backend.py +++ b/manila_tempest_tests/tests/api/admin/test_multi_backend.py @@ -13,11 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa from tempest_lib.common.utils import data_utils # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base + CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/admin/test_quotas.py b/manila_tempest_tests/tests/api/admin/test_quotas.py similarity index 98% rename from contrib/tempest/tempest/api/share/admin/test_quotas.py rename to manila_tempest_tests/tests/api/admin/test_quotas.py index 70c397993d..dd7164eb3b 100644 --- a/contrib/tempest/tempest/api/share/admin/test_quotas.py +++ b/manila_tempest_tests/tests/api/admin/test_quotas.py @@ -13,10 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest.api.share import base -from tempest import clients_share as clients -from tempest import config_share as config -from tempest import test +from tempest import config # noqa +from tempest import test # noqa + +from manila_tempest_tests import clients_share as clients +from manila_tempest_tests.tests.api import base CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/admin/test_quotas_negative.py b/manila_tempest_tests/tests/api/admin/test_quotas_negative.py similarity index 97% rename from contrib/tempest/tempest/api/share/admin/test_quotas_negative.py rename to manila_tempest_tests/tests/api/admin/test_quotas_negative.py index 84a9b0f106..7850a2d0ee 100644 --- a/contrib/tempest/tempest/api/share/admin/test_quotas_negative.py +++ b/manila_tempest_tests/tests/api/admin/test_quotas_negative.py @@ -13,13 +13,13 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa import testtools # noqa -from tempest.api.share import base -from tempest import clients_share as clients -from tempest import config_share as config -from tempest import test +from manila_tempest_tests import clients_share as clients +from manila_tempest_tests.tests.api import base CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/admin/test_scheduler_stats.py b/manila_tempest_tests/tests/api/admin/test_scheduler_stats.py similarity index 97% rename from contrib/tempest/tempest/api/share/admin/test_scheduler_stats.py rename to manila_tempest_tests/tests/api/admin/test_scheduler_stats.py index 3d918e32c3..939c3a944c 100644 --- a/contrib/tempest/tempest/api/share/admin/test_scheduler_stats.py +++ b/manila_tempest_tests/tests/api/admin/test_scheduler_stats.py @@ -12,11 +12,11 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/admin/test_security_services.py b/manila_tempest_tests/tests/api/admin/test_security_services.py similarity index 93% rename from contrib/tempest/tempest/api/share/admin/test_security_services.py rename to manila_tempest_tests/tests/api/admin/test_security_services.py index 114eb78502..562aa3d334 100644 --- a/contrib/tempest/tempest/api/share/admin/test_security_services.py +++ b/manila_tempest_tests/tests/api/admin/test_security_services.py @@ -13,9 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest.api.share import base -from tempest.api.share import test_security_services -from tempest import test +from tempest import test # noqa + +from manila_tempest_tests.tests.api import base +from manila_tempest_tests.tests.api import test_security_services class SecurityServiceAdminTest( diff --git a/contrib/tempest/tempest/api/share/admin/test_services.py b/manila_tempest_tests/tests/api/admin/test_services.py similarity index 97% rename from contrib/tempest/tempest/api/share/admin/test_services.py rename to manila_tempest_tests/tests/api/admin/test_services.py index fd65d2ad23..4b4085ca52 100644 --- a/contrib/tempest/tempest/api/share/admin/test_services.py +++ b/manila_tempest_tests/tests/api/admin/test_services.py @@ -13,8 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest.api.share import base -from tempest import test +from tempest import test # noqa + +from manila_tempest_tests.tests.api import base class ServicesAdminTest(base.BaseSharesAdminTest): diff --git a/contrib/tempest/tempest/api/share/admin/test_services_negative.py b/manila_tempest_tests/tests/api/admin/test_services_negative.py similarity index 95% rename from contrib/tempest/tempest/api/share/admin/test_services_negative.py rename to manila_tempest_tests/tests/api/admin/test_services_negative.py index cce58af6b7..6ed0c05347 100644 --- a/contrib/tempest/tempest/api/share/admin/test_services_negative.py +++ b/manila_tempest_tests/tests/api/admin/test_services_negative.py @@ -13,11 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa -from tempest.api.share import base -from tempest import clients_share as clients -from tempest import test +from manila_tempest_tests import clients_share as clients +from manila_tempest_tests.tests.api import base class ServicesAdminNegativeTest(base.BaseSharesAdminTest): diff --git a/contrib/tempest/tempest/api/share/admin/test_share_manage.py b/manila_tempest_tests/tests/api/admin/test_share_manage.py similarity index 98% rename from contrib/tempest/tempest/api/share/admin/test_share_manage.py rename to manila_tempest_tests/tests/api/admin/test_share_manage.py index 3fd01a9a53..df3896ecc9 100644 --- a/contrib/tempest/tempest/api/share/admin/test_share_manage.py +++ b/manila_tempest_tests/tests/api/admin/test_share_manage.py @@ -13,13 +13,13 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa from tempest_lib.common.utils import data_utils # noqa from tempest_lib import exceptions as lib_exc # noqa import testtools # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/admin/test_share_networks.py b/manila_tempest_tests/tests/api/admin/test_share_networks.py similarity index 96% rename from contrib/tempest/tempest/api/share/admin/test_share_networks.py rename to manila_tempest_tests/tests/api/admin/test_share_networks.py index 9dfb522f5f..c54ab97a7b 100644 --- a/contrib/tempest/tempest/api/share/admin/test_share_networks.py +++ b/manila_tempest_tests/tests/api/admin/test_share_networks.py @@ -13,9 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest.api.share import base -from tempest.api.share import test_share_networks -from tempest import test +from tempest import test # noqa + +from manila_tempest_tests.tests.api import base +from manila_tempest_tests.tests.api import test_share_networks class ShareNetworkAdminTest( diff --git a/contrib/tempest/tempest/api/share/admin/test_share_servers.py b/manila_tempest_tests/tests/api/admin/test_share_servers.py similarity index 99% rename from contrib/tempest/tempest/api/share/admin/test_share_servers.py rename to manila_tempest_tests/tests/api/admin/test_share_servers.py index 8e381f1f06..7cd67f8220 100644 --- a/contrib/tempest/tempest/api/share/admin/test_share_servers.py +++ b/manila_tempest_tests/tests/api/admin/test_share_servers.py @@ -16,11 +16,11 @@ import re import six # noqa +from tempest import config # noqa +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/admin/test_share_servers_negative.py b/manila_tempest_tests/tests/api/admin/test_share_servers_negative.py similarity index 97% rename from contrib/tempest/tempest/api/share/admin/test_share_servers_negative.py rename to manila_tempest_tests/tests/api/admin/test_share_servers_negative.py index 00a812eaf9..b664de5fc2 100644 --- a/contrib/tempest/tempest/api/share/admin/test_share_servers_negative.py +++ b/manila_tempest_tests/tests/api/admin/test_share_servers_negative.py @@ -13,12 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import test # noqa from tempest_lib.common.utils import data_utils # noqa from tempest_lib import exceptions as lib_exc # noqa -from tempest.api.share import base -from tempest import clients_share as clients -from tempest import test +from manila_tempest_tests import clients_share as clients +from manila_tempest_tests.tests.api import base class ShareServersNegativeAdminTest(base.BaseSharesAdminTest): diff --git a/contrib/tempest/tempest/api/share/admin/test_share_types.py b/manila_tempest_tests/tests/api/admin/test_share_types.py similarity index 98% rename from contrib/tempest/tempest/api/share/admin/test_share_types.py rename to manila_tempest_tests/tests/api/admin/test_share_types.py index 1ef721e215..465d8d5a99 100644 --- a/contrib/tempest/tempest/api/share/admin/test_share_types.py +++ b/manila_tempest_tests/tests/api/admin/test_share_types.py @@ -13,12 +13,13 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa from tempest_lib.common.utils import data_utils # noqa from tempest_lib import exceptions as lib_exc # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base + CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/admin/test_share_types_extra_specs.py b/manila_tempest_tests/tests/api/admin/test_share_types_extra_specs.py similarity index 98% rename from contrib/tempest/tempest/api/share/admin/test_share_types_extra_specs.py rename to manila_tempest_tests/tests/api/admin/test_share_types_extra_specs.py index 5da1050de1..c4be5a840a 100644 --- a/contrib/tempest/tempest/api/share/admin/test_share_types_extra_specs.py +++ b/manila_tempest_tests/tests/api/admin/test_share_types_extra_specs.py @@ -15,10 +15,10 @@ import copy +from tempest import test # noqa from tempest_lib.common.utils import data_utils # noqa -from tempest.api.share import base -from tempest import test +from manila_tempest_tests.tests.api import base class ExtraSpecsReadAdminTest(base.BaseSharesAdminTest): diff --git a/contrib/tempest/tempest/api/share/admin/test_share_types_extra_specs_negative.py b/manila_tempest_tests/tests/api/admin/test_share_types_extra_specs_negative.py similarity index 98% rename from contrib/tempest/tempest/api/share/admin/test_share_types_extra_specs_negative.py rename to manila_tempest_tests/tests/api/admin/test_share_types_extra_specs_negative.py index b646df79a2..aaad426e9a 100644 --- a/contrib/tempest/tempest/api/share/admin/test_share_types_extra_specs_negative.py +++ b/manila_tempest_tests/tests/api/admin/test_share_types_extra_specs_negative.py @@ -13,12 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import test # noqa from tempest_lib.common.utils import data_utils # noqa from tempest_lib import exceptions as lib_exc # noqa -from tempest.api.share import base -from tempest import clients_share as clients -from tempest import test +from manila_tempest_tests import clients_share as clients +from manila_tempest_tests.tests.api import base class ExtraSpecsAdminNegativeTest(base.BaseSharesAdminTest): diff --git a/contrib/tempest/tempest/api/share/admin/test_share_types_negative.py b/manila_tempest_tests/tests/api/admin/test_share_types_negative.py similarity index 95% rename from contrib/tempest/tempest/api/share/admin/test_share_types_negative.py rename to manila_tempest_tests/tests/api/admin/test_share_types_negative.py index c83d9bd01f..62e4523af1 100644 --- a/contrib/tempest/tempest/api/share/admin/test_share_types_negative.py +++ b/manila_tempest_tests/tests/api/admin/test_share_types_negative.py @@ -13,12 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import test # noqa from tempest_lib.common.utils import data_utils # noqa from tempest_lib import exceptions as lib_exc # noqa -from tempest.api.share import base -from tempest import clients_share as clients -from tempest import test +from manila_tempest_tests import clients_share as clients +from manila_tempest_tests.tests.api import base class ShareTypesAdminNegativeTest(base.BaseSharesAdminTest): diff --git a/contrib/tempest/tempest/api/share/admin/test_shares_actions.py b/manila_tempest_tests/tests/api/admin/test_shares_actions.py similarity index 99% rename from contrib/tempest/tempest/api/share/admin/test_shares_actions.py rename to manila_tempest_tests/tests/api/admin/test_shares_actions.py index 2a1d2f2428..b2904c49eb 100644 --- a/contrib/tempest/tempest/api/share/admin/test_shares_actions.py +++ b/manila_tempest_tests/tests/api/admin/test_shares_actions.py @@ -13,12 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa from tempest_lib.common.utils import data_utils # noqa import testtools # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/base.py b/manila_tempest_tests/tests/api/base.py similarity index 99% rename from contrib/tempest/tempest/api/share/base.py rename to manila_tempest_tests/tests/api/base.py index e648816d1e..554ba35c00 100644 --- a/contrib/tempest/tempest/api/share/base.py +++ b/manila_tempest_tests/tests/api/base.py @@ -20,14 +20,14 @@ import traceback from oslo_concurrency import lockutils from oslo_log import log import six +from tempest.common import isolated_creds # noqa +from tempest import config # noqa +from tempest import test # noqa from tempest_lib.common.utils import data_utils from tempest_lib import exceptions -from tempest import clients_share as clients # noqa -from tempest.common import isolated_creds # noqa -from tempest import config_share as config # noqa -from tempest import share_exceptions # noqa -from tempest import test # noqa +from manila_tempest_tests import clients_share as clients +from manila_tempest_tests import share_exceptions CONF = config.CONF LOG = log.getLogger(__name__) diff --git a/contrib/tempest/tempest/api/share/test_extensions.py b/manila_tempest_tests/tests/api/test_extensions.py similarity index 92% rename from contrib/tempest/tempest/api/share/test_extensions.py rename to manila_tempest_tests/tests/api/test_extensions.py index 6e354085f5..1d71d1102e 100644 --- a/contrib/tempest/tempest/api/share/test_extensions.py +++ b/manila_tempest_tests/tests/api/test_extensions.py @@ -13,8 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest.api.share import base -from tempest import test +from tempest import test # noqa + +from manila_tempest_tests.tests.api import base class ExtensionsTest(base.BaseSharesTest): diff --git a/contrib/tempest/tempest/api/share/test_limits.py b/manila_tempest_tests/tests/api/test_limits.py similarity index 96% rename from contrib/tempest/tempest/api/share/test_limits.py rename to manila_tempest_tests/tests/api/test_limits.py index 35075aa090..044d6010c5 100644 --- a/contrib/tempest/tempest/api/share/test_limits.py +++ b/manila_tempest_tests/tests/api/test_limits.py @@ -13,8 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest.api.share import base -from tempest import test +from tempest import test # noqa + +from manila_tempest_tests.tests.api import base class ShareLimitsTest(base.BaseSharesTest): diff --git a/contrib/tempest/tempest/api/share/test_metadata.py b/manila_tempest_tests/tests/api/test_metadata.py similarity index 98% rename from contrib/tempest/tempest/api/share/test_metadata.py rename to manila_tempest_tests/tests/api/test_metadata.py index 4bf30d1089..47d31f9730 100644 --- a/contrib/tempest/tempest/api/share/test_metadata.py +++ b/manila_tempest_tests/tests/api/test_metadata.py @@ -13,8 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest.api.share import base -from tempest import test +from tempest import test # noqa + +from manila_tempest_tests.tests.api import base class SharesMetadataTest(base.BaseSharesTest): diff --git a/contrib/tempest/tempest/api/share/test_metadata_negative.py b/manila_tempest_tests/tests/api/test_metadata_negative.py similarity index 97% rename from contrib/tempest/tempest/api/share/test_metadata_negative.py rename to manila_tempest_tests/tests/api/test_metadata_negative.py index 99a4443ad0..7401a41b24 100644 --- a/contrib/tempest/tempest/api/share/test_metadata_negative.py +++ b/manila_tempest_tests/tests/api/test_metadata_negative.py @@ -13,10 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa -from tempest.api.share import base -from tempest import test +from manila_tempest_tests.tests.api import base class SharesMetadataNegativeTest(base.BaseSharesTest): diff --git a/contrib/tempest/tempest/api/share/test_quotas.py b/manila_tempest_tests/tests/api/test_quotas.py similarity index 96% rename from contrib/tempest/tempest/api/share/test_quotas.py rename to manila_tempest_tests/tests/api/test_quotas.py index afeb82e33d..af5885af71 100644 --- a/contrib/tempest/tempest/api/share/test_quotas.py +++ b/manila_tempest_tests/tests/api/test_quotas.py @@ -13,8 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest.api.share import base -from tempest import test +from tempest import test # noqa + +from manila_tempest_tests.tests.api import base class SharesQuotasTest(base.BaseSharesTest): diff --git a/contrib/tempest/tempest/api/share/test_quotas_negative.py b/manila_tempest_tests/tests/api/test_quotas_negative.py similarity index 94% rename from contrib/tempest/tempest/api/share/test_quotas_negative.py rename to manila_tempest_tests/tests/api/test_quotas_negative.py index f0363f9a43..0736b98ae7 100644 --- a/contrib/tempest/tempest/api/share/test_quotas_negative.py +++ b/manila_tempest_tests/tests/api/test_quotas_negative.py @@ -13,11 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa import testtools # noqa -from tempest.api.share import base -from tempest import test +from manila_tempest_tests.tests.api import base class SharesQuotasNegativeTest(base.BaseSharesTest): diff --git a/contrib/tempest/tempest/api/share/test_rules.py b/manila_tempest_tests/tests/api/test_rules.py similarity index 98% rename from contrib/tempest/tempest/api/share/test_rules.py rename to manila_tempest_tests/tests/api/test_rules.py index 2644914b2f..7198c907a5 100644 --- a/contrib/tempest/tempest/api/share/test_rules.py +++ b/manila_tempest_tests/tests/api/test_rules.py @@ -13,12 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa import testtools # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/test_rules_negative.py b/manila_tempest_tests/tests/api/test_rules_negative.py similarity index 99% rename from contrib/tempest/tempest/api/share/test_rules_negative.py rename to manila_tempest_tests/tests/api/test_rules_negative.py index c9579ff71d..6ad36ba2e0 100644 --- a/contrib/tempest/tempest/api/share/test_rules_negative.py +++ b/manila_tempest_tests/tests/api/test_rules_negative.py @@ -13,12 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa import testtools # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/test_scheduler_stats_negative.py b/manila_tempest_tests/tests/api/test_scheduler_stats_negative.py similarity index 93% rename from contrib/tempest/tempest/api/share/test_scheduler_stats_negative.py rename to manila_tempest_tests/tests/api/test_scheduler_stats_negative.py index 5c7a0c4c11..9be8f64277 100644 --- a/contrib/tempest/tempest/api/share/test_scheduler_stats_negative.py +++ b/manila_tempest_tests/tests/api/test_scheduler_stats_negative.py @@ -13,10 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa -from tempest.api.share import base -from tempest import test +from manila_tempest_tests.tests.api import base class SchedulerStatsNegativeTest(base.BaseSharesTest): diff --git a/contrib/tempest/tempest/api/share/test_security_services.py b/manila_tempest_tests/tests/api/test_security_services.py similarity index 98% rename from contrib/tempest/tempest/api/share/test_security_services.py rename to manila_tempest_tests/tests/api/test_security_services.py index cd400bebb5..c0d67ec1f3 100644 --- a/contrib/tempest/tempest/api/share/test_security_services.py +++ b/manila_tempest_tests/tests/api/test_security_services.py @@ -15,11 +15,11 @@ from oslo_log import log # noqa import six # noqa +from tempest import config # noqa +from tempest import test # noqa import testtools # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base CONF = config.CONF LOG = log.getLogger(__name__) diff --git a/contrib/tempest/tempest/api/share/test_security_services_mapping.py b/manila_tempest_tests/tests/api/test_security_services_mapping.py similarity index 96% rename from contrib/tempest/tempest/api/share/test_security_services_mapping.py rename to manila_tempest_tests/tests/api/test_security_services_mapping.py index 4ca600c888..7173e22f53 100644 --- a/contrib/tempest/tempest/api/share/test_security_services_mapping.py +++ b/manila_tempest_tests/tests/api/test_security_services_mapping.py @@ -13,8 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest.api.share import base -from tempest import test +from tempest import test # noqa + +from manila_tempest_tests.tests.api import base class SecurityServicesMappingTest(base.BaseSharesTest): diff --git a/contrib/tempest/tempest/api/share/test_security_services_mapping_negative.py b/manila_tempest_tests/tests/api/test_security_services_mapping_negative.py similarity index 98% rename from contrib/tempest/tempest/api/share/test_security_services_mapping_negative.py rename to manila_tempest_tests/tests/api/test_security_services_mapping_negative.py index 7e6146c959..de0064cbff 100644 --- a/contrib/tempest/tempest/api/share/test_security_services_mapping_negative.py +++ b/manila_tempest_tests/tests/api/test_security_services_mapping_negative.py @@ -13,12 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa import testtools # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/test_security_services_negative.py b/manila_tempest_tests/tests/api/test_security_services_negative.py similarity index 97% rename from contrib/tempest/tempest/api/share/test_security_services_negative.py rename to manila_tempest_tests/tests/api/test_security_services_negative.py index b0f06daeee..5908f818ee 100644 --- a/contrib/tempest/tempest/api/share/test_security_services_negative.py +++ b/manila_tempest_tests/tests/api/test_security_services_negative.py @@ -15,12 +15,12 @@ from oslo_log import log # noqa import six # noqa +from tempest import config # noqa +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa import testtools # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base CONF = config.CONF LOG = log.getLogger(__name__) diff --git a/contrib/tempest/tempest/api/share/test_share_networks.py b/manila_tempest_tests/tests/api/test_share_networks.py similarity index 98% rename from contrib/tempest/tempest/api/share/test_share_networks.py rename to manila_tempest_tests/tests/api/test_share_networks.py index 107dc485b3..4dfef3112f 100644 --- a/contrib/tempest/tempest/api/share/test_share_networks.py +++ b/manila_tempest_tests/tests/api/test_share_networks.py @@ -14,11 +14,11 @@ # under the License. import six # noqa +from tempest import config # noqa +from tempest import test # noqa import testtools # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/test_share_networks_negative.py b/manila_tempest_tests/tests/api/test_share_networks_negative.py similarity index 97% rename from contrib/tempest/tempest/api/share/test_share_networks_negative.py rename to manila_tempest_tests/tests/api/test_share_networks_negative.py index 25b11ec034..d0036c3d08 100644 --- a/contrib/tempest/tempest/api/share/test_share_networks_negative.py +++ b/manila_tempest_tests/tests/api/test_share_networks_negative.py @@ -13,12 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa import testtools # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/test_share_types_negative.py b/manila_tempest_tests/tests/api/test_share_types_negative.py similarity index 94% rename from contrib/tempest/tempest/api/share/test_share_types_negative.py rename to manila_tempest_tests/tests/api/test_share_types_negative.py index eb10b0ceaa..4d2c1895bb 100644 --- a/contrib/tempest/tempest/api/share/test_share_types_negative.py +++ b/manila_tempest_tests/tests/api/test_share_types_negative.py @@ -13,12 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import test # noqa from tempest_lib.common.utils import data_utils # noqa from tempest_lib import exceptions as lib_exc # noqa -from tempest.api.share import base -from tempest import clients_share as clients -from tempest import test +from manila_tempest_tests import clients_share as clients +from manila_tempest_tests.tests.api import base class ShareTypesNegativeTest(base.BaseSharesTest): diff --git a/contrib/tempest/tempest/api/share/test_shares.py b/manila_tempest_tests/tests/api/test_shares.py similarity index 98% rename from contrib/tempest/tempest/api/share/test_shares.py rename to manila_tempest_tests/tests/api/test_shares.py index 8c4fd845bd..b5c7e01bb6 100644 --- a/contrib/tempest/tempest/api/share/test_shares.py +++ b/manila_tempest_tests/tests/api/test_shares.py @@ -13,12 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa import testtools # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/test_shares_actions.py b/manila_tempest_tests/tests/api/test_shares_actions.py similarity index 99% rename from contrib/tempest/tempest/api/share/test_shares_actions.py rename to manila_tempest_tests/tests/api/test_shares_actions.py index 30cfd76274..94754a8e26 100644 --- a/contrib/tempest/tempest/api/share/test_shares_actions.py +++ b/manila_tempest_tests/tests/api/test_shares_actions.py @@ -13,12 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa from tempest_lib.common.utils import data_utils # noqa import testtools # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import test +from manila_tempest_tests.tests.api import base CONF = config.CONF diff --git a/contrib/tempest/tempest/api/share/test_shares_actions_negative.py b/manila_tempest_tests/tests/api/test_shares_actions_negative.py similarity index 95% rename from contrib/tempest/tempest/api/share/test_shares_actions_negative.py rename to manila_tempest_tests/tests/api/test_shares_actions_negative.py index 512849cc86..624bf31e4e 100644 --- a/contrib/tempest/tempest/api/share/test_shares_actions_negative.py +++ b/manila_tempest_tests/tests/api/test_shares_actions_negative.py @@ -13,13 +13,13 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa import testtools # noqa -from tempest.api.share import base -from tempest import clients_share as clients -from tempest import config_share as config -from tempest import test +from manila_tempest_tests import clients_share as clients +from manila_tempest_tests.tests.api import base CONF = config.CONF @@ -133,4 +133,4 @@ class SharesActionsNegativeTest(base.BaseSharesTest): self.assertRaises(lib_exc.BadRequest, self.shares_client.shrink_share, share['id'], - new_size) \ No newline at end of file + new_size) diff --git a/contrib/tempest/tempest/api/share/test_shares_negative.py b/manila_tempest_tests/tests/api/test_shares_negative.py similarity index 98% rename from contrib/tempest/tempest/api/share/test_shares_negative.py rename to manila_tempest_tests/tests/api/test_shares_negative.py index d464328cf2..ae57a5fe68 100644 --- a/contrib/tempest/tempest/api/share/test_shares_negative.py +++ b/manila_tempest_tests/tests/api/test_shares_negative.py @@ -13,13 +13,13 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config # noqa +from tempest import test # noqa from tempest_lib import exceptions as lib_exc # noqa import testtools # noqa -from tempest.api.share import base -from tempest import config_share as config -from tempest import share_exceptions -from tempest import test +from manila_tempest_tests import share_exceptions +from manila_tempest_tests.tests.api import base CONF = config.CONF diff --git a/manila_tempest_tests/tests/scenario/__init__.py b/manila_tempest_tests/tests/scenario/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/contrib/tempest/tempest/scenario/manager_share.py b/manila_tempest_tests/tests/scenario/manager_share.py similarity index 96% rename from contrib/tempest/tempest/scenario/manager_share.py rename to manila_tempest_tests/tests/scenario/manager_share.py index 6702fd331c..a8133f994d 100644 --- a/contrib/tempest/tempest/scenario/manager_share.py +++ b/manila_tempest_tests/tests/scenario/manager_share.py @@ -13,15 +13,15 @@ # License for the specific language governing permissions and limitations # under the License. -import six # noqa +from oslo_log import log +import six -from oslo_log import log # noqa -from tempest_lib.common.utils import data_utils # noqa +from tempest.common.utils.linux import remote_client # noqa +from tempest import config # noqa +from tempest.scenario import manager # noqa +from tempest_lib.common.utils import data_utils -from tempest import clients_share -from tempest.common.utils.linux import remote_client -from tempest import config -from tempest.scenario import manager +from manila_tempest_tests import clients_share CONF = config.CONF diff --git a/contrib/tempest/tempest/scenario/test_share_basic_ops.py b/manila_tempest_tests/tests/scenario/test_share_basic_ops.py similarity index 97% rename from contrib/tempest/tempest/scenario/test_share_basic_ops.py rename to manila_tempest_tests/tests/scenario/test_share_basic_ops.py index c3ee3efc3c..2864b00d4b 100644 --- a/contrib/tempest/tempest/scenario/test_share_basic_ops.py +++ b/manila_tempest_tests/tests/scenario/test_share_basic_ops.py @@ -14,12 +14,12 @@ # under the License. from oslo_log import log as logging +from tempest import config # noqa +from tempest import test # noqa from tempest_lib.common.utils import data_utils from tempest_lib import exceptions -from tempest import config # noqa -from tempest.scenario import manager_share as manager # noqa -from tempest import test # noqa +from manila_tempest_tests.tests.scenario import manager_share as manager CONF = config.CONF @@ -47,7 +47,7 @@ class ShareBasicOpsBase(manager.ShareScenarioTest): if not hasattr(self, 'flavor_ref'): self.flavor_ref = CONF.share.client_vm_flavor_ref if CONF.share.image_with_share_tools: - images = self.images_client.list_images() + images = self.images_client.list_images()["images"] for img in images: if img["name"] == CONF.share.image_with_share_tools: self.image_ref = img['id'] @@ -79,7 +79,8 @@ class ShareBasicOpsBase(manager.ShareScenarioTest): def init_ssh(self, instance, do_ping=False): # Obtain a floating IP - floating_ip = self.floating_ips_client.create_floating_ip() + floating_ip = (self.floating_ips_client.create_floating_ip() + ['floating_ip']) self.addCleanup(self.delete_wrapper, self.floating_ips_client.delete_floating_ip, floating_ip['id']) diff --git a/setup.cfg b/setup.cfg index 59b6397547..a7e720b96f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -53,6 +53,8 @@ oslo.config.opts = manila.share.drivers.emc.plugins = vnx = manila.share.drivers.emc.plugins.vnx.connection:VNXStorageConnection isilon = manila.share.drivers.emc.plugins.isilon.isilon:IsilonStorageConnection +tempest.test_plugins = + manila_tests = manila_tempest_tests.plugin:ManilaTempestPlugin [build_sphinx] all_files = 1