diff --git a/.gitignore b/.gitignore index 6aa26ca4..e6285a17 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ build .eggs *.egg-info .tox +.stestr diff --git a/requirements.txt b/requirements.txt index 8b137891..bb20ec89 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,5 @@ - +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. +oslo.log +tempest diff --git a/rhostest_tempest_plugin/tests/api/__init__.py b/rhostest_tempest_plugin/api/__init__.py similarity index 100% rename from rhostest_tempest_plugin/tests/api/__init__.py rename to rhostest_tempest_plugin/api/__init__.py diff --git a/rhostest_tempest_plugin/tests/api/base.py b/rhostest_tempest_plugin/api/base.py similarity index 100% rename from rhostest_tempest_plugin/tests/api/base.py rename to rhostest_tempest_plugin/api/base.py diff --git a/rhostest_tempest_plugin/tests/api/test_sample.py b/rhostest_tempest_plugin/api/test_sample.py similarity index 100% rename from rhostest_tempest_plugin/tests/api/test_sample.py rename to rhostest_tempest_plugin/api/test_sample.py diff --git a/rhostest_tempest_plugin/tests/scenario/__init__.py b/rhostest_tempest_plugin/scenario/__init__.py similarity index 100% rename from rhostest_tempest_plugin/tests/scenario/__init__.py rename to rhostest_tempest_plugin/scenario/__init__.py diff --git a/rhostest_tempest_plugin/tests/scenario/test_pointer_device_type.py b/rhostest_tempest_plugin/scenario/test_pointer_device_type.py similarity index 100% rename from rhostest_tempest_plugin/tests/scenario/test_pointer_device_type.py rename to rhostest_tempest_plugin/scenario/test_pointer_device_type.py diff --git a/rhostest_tempest_plugin/tests/scenario/test_refresh_quota_usages.py b/rhostest_tempest_plugin/scenario/test_refresh_quota_usages.py similarity index 100% rename from rhostest_tempest_plugin/tests/scenario/test_refresh_quota_usages.py rename to rhostest_tempest_plugin/scenario/test_refresh_quota_usages.py diff --git a/rhostest_tempest_plugin/tests/base.py b/rhostest_tempest_plugin/tests/base.py new file mode 100644 index 00000000..2911d501 --- /dev/null +++ b/rhostest_tempest_plugin/tests/base.py @@ -0,0 +1,19 @@ +# Copyright 2018 Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from oslotest import base + + +class WhiteboxPluginTestCase(base.BaseTestCase): + pass diff --git a/rhostest_tempest_plugin/tests/test_placeholder.py b/rhostest_tempest_plugin/tests/test_placeholder.py new file mode 100644 index 00000000..fb497bff --- /dev/null +++ b/rhostest_tempest_plugin/tests/test_placeholder.py @@ -0,0 +1,24 @@ +# Copyright 2018 Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from rhostest_tempest_plugin.tests import base + + +class PlaceholderTestCase(base.WhiteboxPluginTestCase): + # TODO(artom) Remove this class when we add actual unit tests. This class + # is only necessary to to avoid stestr complaining about not finding any + # tests. + + def test_placeholder(self): + pass diff --git a/test-requirements.txt b/test-requirements.txt index 9addc514..86da6c85 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,13 +1,5 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking<0.12,>=0.11.0 # Apache-2.0 -# needed for doc build -sphinx!=1.3b1,<1.3,>=1.2.1 # BSD -python-subunit>=0.0.18 # Apache-2.0/BSD -oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0 -reno>=1.8.0 # Apache2 -mock>=2.0 # BSD -coverage>=3.6 # Apache-2.0 -oslotest>=1.10.0 # Apache-2.0 -tempest +hacking +oslotest diff --git a/tox.ini b/tox.ini index cd08740f..6ba41ed3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,11 @@ [tox] -envlist = pep8 +envlist = flake8,py27 minversion = 2.3.1 skipsdist = True [testenv] setenv = VIRTUAL_ENV={envdir} -passenv = OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_TEST_TIMEOUT OS_TEST_LOCK_PATH TEMPEST_CONFIG TEMPEST_CONFIG_DIR http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY usedevelop = True install_command = pip install -U {opts} {packages} whitelist_externals = * @@ -15,22 +14,12 @@ deps = -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.pyc" -delete - bash tools/pretty_tox.sh '{posargs}' + stestr --test-path ./rhostest_tempest_plugin/tests run {posargs} -[testenv:pep8] +[testenv:flake8] commands = flake8 {posargs} - check-uuid - -[hacking] -local-check-factory = tempest.hacking.checks.factory -import_exceptions = tempest.services [flake8] -# E125 is a won't fix until https://github.com/jcrocholl/pep8/issues/126 is resolved. For further detail see https://review.openstack.org/#/c/36788/ -# E123 skipped because it is ignored by default in the default pep8 -# E129 skipped because it is too limiting when combined with other rules -# Skipped because of new hacking 0.9: H405 -ignore = E125,E123,E129 show-source = True -exclude = .git,.venv,.tox,dist,doc,openstack,*egg,test_nova_manage_archive.py +exclude = .git,.venv,.tox,dist,doc,*egg