We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: Ic9645685e0f9ae25b0b2b754b11e34d8aef41829
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Instead of doing two separate test runs, use the group_regex option to
stestr to group tests that cannot be run in parallel into the same
worker.
Change-Id: I3d69d5c72d69484f4e1c9c0b11122d0cf3703d60
Related-Bug: #1768077
Blacklist the two currently skipped functional-py35 tests and
include them in a new non-voting job so that their failure is
obvious instead of hidden.
Change-Id: Ice8e114c6590b25f3ec79fbe4c06efaa245706c0
Partial-bug: #1769006
Default behavior in tox is to bail when there's a failure in a set
of commands in a testenv. Now that the functional tests run multiple
commands, this behavior isn't desirable. Add the ignore_errors
configuration to the two functional testenvs so all functional tests
will be run.
Change-Id: I8525d0988c6df4d3339e2ac68dc9b6effe07231f
The current scrubber functional tests seem to be confusing the subunit parser.
This patch modifies the functional test definition in tox.ini to run serial
tests separately from the "regular" functional tests and moves the current
scrubber tests to the 'serial' directory
Change-Id: I041c90aa8854bca30f9ea7b0c9d81e41f79cb81e
Partial-bug: #1768077
Adds .htaccess containing redirects so old URLs can retrieve
the correct document from the docs reorganization introduced
with commit 1c7f556d4f77d2dd7f282f2b41bdfb2abb6e5740.
Change-Id: I9678eedd5634ac04482f3f8b5ee0e4177cf985e3
Needed-by: https://review.openstack.org/564344
Partial-bug: #1766257
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.
Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.
Add openstack-tox-lower-constraints job to the zuul configuration.
See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.
Change-Id: Ibd41a407f8f5f4eb2de1a44904fb7df5ab81e30c
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
The Glance unit and functional tests were split out by change
I93d7216340bef70fc18fc9943da5c740ba3d4761. (Previously Glance had
only 'py27' and 'py35' tox testenvs that handled both unit and
functional tests.) That change made it easier to run the faster
unit tests separately during development, but made it so that simply
running 'tox' locally no longer ran all relevant tests. This change
modifies tox.ini so that running tox with the defaults will run all
unit and functional tests. The tests continue to be run separately
in gate/check jobs.
Change-Id: I6745ebfc0ca7e8b59dc4abf63b3d6dad1fde76fd
Recently merged patch [1] causes py35 functional tests under py27
environment. As a result py35 functional tests also hangs (refer
bug [2]). The reason for this is in patch [1] intended to use already
created environment using 'envdir' variable but somehow it uses py27
environment instead of py35 environment.
Removed 'envdir' from functional and functional-py35 section so that
it can creates its own environment for execution.
[1] https://review.openstack.org/#/c/474816/
[2] https://bugs.launchpad.net/glance/+bug/1744824
Change-Id: I405b3718358b9977384696c8f004ffb2cf922ef5
This breaks out the functional tests from the unit tests to allow running
just unit test for faster validation. Additional gate jobs will be added
to run the new functional test jobs so we don't lose that coverage, but
during development, by default only the unit tests will run.
Change-Id: I93d7216340bef70fc18fc9943da5c740ba3d4761
This patch adds a doc8 check of .rst files to the current pep8 check.
It includes fixes to the .rst files that didn't pass the check.
Co-authored-By: Hoang Trung Hieu <hieuht@vn.fujitsu.com>
Change-Id: I5a9299200202576d97760ebf07bceb930888f2d7
Implements the spec Inject metadata properties automatically
to non-admin images
This commit adds new task '_InjectImageMetadata' to inject
the metadata properties automatically to non-admin images
at the time of creation of images using newly introduce
'image-import' api in v2.
DocImpact
Implements: I6a7ed31d5fae677cbbc9a6f6053f79d3e9326561
Change-Id: I98be97c42f23b60a72d520aad5f6078a96372c59
TrivialFix:In the change[1] os_testr changed under the covers
from using testr to stestr, so that we now get the following
warning:
ostestr.py:120:
UserWarning: No .stestr.conf file found in the CWD.
Please create one to to replace the .testr.conf. You
can find a script to do this in the stestr git repository.
So remove the .testr.conf and add .stestr.conf which was
generated using a utility script as documented here [2].
[1] Id7cb2a39a8308f1413608dcf19273a1d7f33592e
[2] https://media.readthedocs.org/pdf/stestr/stable/stestr.pdf
Change-Id: I4810ac86aeca23e5abff3dc0417ffa3aa2f3a199
This avoids falling back to the global bindep-fallback.txt which
installs a pretty big environment. Without this change, a lot
of additional but unnecessary packages are installed on the nodepool
workers.
Change-Id: Id6c17f9a53ad8ad5f0bb9d308ccf5d33a6f59f7f
This patch enables the py35 job in tox.ini to run using ostestr.
It also fixes a bytes encoding issue in the 'test_wsgi' functional
test to make progress towards the community goal of enabling
python3.5. Two other functional tests remain disabled and will need
to be addressed in a later patch in order to fully complete the
community goal - 'test_ssl' and 'test_reload'. These tests fail
due to SSL handshake not working in python3.5 when using self-signed
certificate and authority.
Change-Id: Ie9071f1a93d8201f754ae3042d6e51b5de6d2e63
Fixed the tests in the `glance.tests.integration` module. Enabled
them to run for py35 job in tox.ini. All changes are related to
string/bytes object differences in python 2.7 vs 3.5.
Also added testing of tasks location header value due to a change in
how it is handled in py27 vs py35.
Change-Id: I26aae0c518fe84c9967461a3b9fef02bc0c17923
Fixed test_api and test_glance_manage functional tests to work on
python3.5. All of the changes are related to decoding of bytes
objects into strings and sorting of json dictionaries.
Enabled the tests in tox.ini.
Change-Id: I5bfcb34956aaf82beaa5e286f2569ccaac5ad32a
Two functional v1 tests were previously not enabled on py35 runs:
`test_api.py` and `test_copy_to_file.py`. Fixed and enabled them
to run in tox.ini. All but one of the changes are related to string
vs bytes differences between python 2.7 and 3.5. Additionally, a
instance of sys.maxint (which was removed in python3) has been
replaced with sys.maxsize.
Change-Id: Ib73aa3feb273e20754e084439376fc171fd84f44
Fixed glance.tests.functional.test_cache_middleware tests to work on
python3.5. Enabled running the tests in tox.ini.
Change-Id: Ie5d4ee52c378aae97f3c944aec8be1a1c4a5edd5
I3026ca6287a65ab5287bf3843f2a9d756ce15139 removed Glare from the Glance
codebase, but left some lines in setup.cfg.
This patch removes the remnant of the references in the code tree.
Co-Authored-By: Javier Pena <jpena@redhat.com>
Co-Authored-By: Nikhil Komawar <nik.komawar@gmail.com>
Depends-on: I02bfe805c419fcc49ac43b66f4f7b1a0d1d54755
Change-Id: Ia3652eb0dede3614cc4ea880f8ddc06c95740797
* Functional tests now use alembic instead of sqlalchmey-migrate
to build and destroy test database.
* All tests now use a file-based sqlite db as opposed to an in-memory
database.
Partially-Implements: blueprint alembic-migrations
Change-Id: I77921366a05ba6f9841143af89c1f4059d8454c6
Depends-On: Ie8594ff339a13bf190aefa308f54e97ee20ecfa2
While reviewing a separate patch in which an entire test environment was
simply copied and pasted just to change the basepython attribute, I
realized Glance could utilize tox's feature set in a much more efficient
manner.
Tox allows you to generate envlists, have "factor-conditional" settings,
and other "factor-conditional" conditions since version 1.8:
https://tox.readthedocs.io/en/latest/config.html#generative-envlist
A good minimum version, though, is 2.3.1 because it has made support for
these features more robust and a lot of bugs have since been fixed.
Change-Id: Ia44a37177d57b972c4c9d0f179291b0c8316dd95
In Python3, the division of two integers may return a floating number, which is
not a valid argument for the range() function.
Change-Id: I7b301c474c2501a5b83b3cb242803dbee669c3bc
This patch fixes 3 issues:
- "RuntimeError: dictionary changed size during iteration"
- "TypeError: 'map' object is not subscriptable"
- "TypeError: object of type 'map' has no len()"
Change-Id: If52ab336512f37b6e5ad6c748bef7996c67cb71a