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
Many deprecations are triggered early (on imports, for example)
before the warnings are enabled by the WarningsFixture in the
base test class.
To make sure all DeprecationWarning messages are emitted we
enable them via the PYTHONWARNINGS environment variable.
This copy from 1be35ff039d67c50866f2556ef847b048cbf3578
Change-Id: I25e51e8365e154489d6513db7a5dd05914a3b221
Openstack infra now supports upper constraints for
all jobs. Updated tox.ini to use upper constraints
for all jobs.
Change-Id: I7d9df75b7f76f5019daae6e9fab30ebea5a7a834
Closed-Bug: #1614361
This brings the Images API Reference to the glance tree as part of
the effort described here:
https://wiki.openstack.org/wiki/Documentation/Migrate#API_Reference_Plan
This patch introduces (a) the tox environment to generate the api-ref,
and (b) the content of the Images v1 API reference converted to RST.
The content has been corrected where I noticed divergences with reality.
Note to reviewers: The conversion project is ongoing, that is, the doc
team is continuing to develop tools (for example, to display the response
codes in a table) and converging on a style for these docs. So this isn't
a final product, there will be more patches later. While this patch is
not perfect, it is pareto-optimal with respect to content (it's at least
as good as the current guide, and better in at least one place). Thus
my advice, should you choose to take it, is that we should merge this
patch to get these docs in-tree, and make improvements as additional
patches that can focus on particular API calls rather than try to get
everything perfect on this patch.
Change-Id: I51dfaf1832108466f115ab183838c5f28e138312
Make use of the testr OpenStack wrapper ostestr instead of
testr directly.
Closes-Bug: #1566353
Change-Id: I85972dd09384dad22e3b78b0365b2026f1baef5c
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
The venv environment is used by infra scripts to build tarballs and
documents - and used by both check and post jobs. In post jobs, we
currently do not support constraints, so add the non-constraints install
command here so that nova-docs (publishing of documents to
docs.openstack.org) and the tarball jobs work again.
Change-Id: I7116134ca0963de001223ba905619947fcbda07a