pyflake8 was updated and not properly constrainted by hacking, update
to hacking 3.1.0 and fix the problems found.
py27 failed since global upper-constraints includes py3 only packages.
Use lower-constraints for this test.
The functional jobs run on master with py27, remove the py27 master job,
change the jobs so that py3 is used everywhere.
Change-Id: I695d60e53857e03f206dcd7cf10c06c76c8d6cc0
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.
This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.
Change-Id: Icac2af192beb9bd4a38b2305ebb6dc5719e4b591
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
To allow non-py27 supporting repos to use shade job templates, this
breaks out the py27 and py3 jobs into separate templates. Relevant repos
can then continue to use the existing template names without picking up
the unsupported job runtimes they no longer need.
Remove the py27-tips jobs - they just don't make any sense any more.
Change-Id: Ia211e31723ede592f19a8df6c18e45699ca25788
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
We want to use the latest version from the stable-2.5 branch, not pin to
2.5.0 which has some issues that break our tests.
Change-Id: If7bab97191c5a29bac79e3f3ecaf10bfe0eac6b5
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.
See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html
Change-Id: I2060b317077a321fce27b6e92112233346e21687
The verification comands used by tox need at least 2.0 version. This
patch aims to update tox version from 1.6 to 2.0 which should help with
local running of constraints targets.
Change-Id: I97ec363926b6e6af26ffb650ced568c7df1f9897
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: I972721cf714d811a427ee6a860b0c18c9920c8bc
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
ansible now depends on openstacksdk and not shade. Update the shade
tests to test against stable-2.5 branch so that we can make sure shade
patches don't break people using older ansible.
Change-Id: Id7af93cbc73b208d7a973ca5101b8977a0ace689
The latest version of pycodestyle got stricter with undefined objects
pulled in via * imports. It's a nice check and actually found a bug, so
instead of disabling it, fix the places where we're using a * import.
W503 on the other hand is terrible.
Change-Id: Id73599ca494545b0f6d2345236190fc13cf2a326
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.
Fix the lower-bound for requests-mock, since 1.1.0 does not actually
work.
Change-Id: I8740a80c64e24c8339ee9b0992c2f81b1784e672
Depends-On: https://review.openstack.org/555034
Depends-On: https://review.openstack.org/555402
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This is the new hotness.
Add doc8 linting to the pep8 target while we're doing it. And, slim down
pep8 tox env. It doesn't need to install shade or any of the
requirements.
Change-Id: I1e73ee503c81f92b4fe84bdd384f856290b6d5dd
The ansible-devel functional test intends to run against tip of ansible
devel. Let Zuul handle that and depends-on once cross-source depends
exist by listing ansible/ansible as a required-project.
Remove the special install handling, as tox-install-siblings should be
taking care of it now.
Change-Id: I93459ffc116f9106d9eb8000a7e5a58bea507308
Depends-On: Ib5e35315fc9ffe6fa8873ad4975309d9820e1feb
Depends-On: I6d234247e3d45befd264e159c8b0fe77f01c7fdc
I created a tox PR[1] to add native support for constraints. The answer
was basically "use deps".
I tested it locally with shade and tox and it does indeed seem to do
what we want. Use shade as a guinea pig before rolling this out wider.
[1] https://github.com/tox-dev/tox/pull/642
Change-Id: I450dd513d7e1f881db764b11dcd6f9072c0c369c
Depends-On: Id61ae52d48b28cfc2221cb556a1c1f7c6dfd60dd
Noticed this for real in openstacksdk. This line is causing python3
tests to not run under python3.
Change-Id: I1ac6396a28ae308f778cabd7d5bc399262772d21
stestr is a fork of testrepository, designed specifically to concentrate
on being a dedicated test runner. [1] The testrepository project is
basically not active anymore and has several long standing bugs and
useablility issues. stestr is still actively maintained and fixes a
large number of those issues with testrepository.
[1] https://github.com/mtreinish/stestr
Change-Id: I9b8049fd2c78d8f90aed5a8b35c0a9b40ad8c463
shade is in global requirements and upper-constraints now, which means
we need to use the tox_install.sh script so that constraints don't break
install of shade itself.
Change-Id: Id286b634046519e34ac2c01461391d5bc61cd919
Here we are adding shade to zuulv3.o.o to aid in testing.
Add UPPER_CONSTRAINTS_FILE to tox whitelist of variables.
Change-Id: I4bc3bd751a80308df3b2114f95886bd104516dd2
Depends-On: Ib9f0a787998f34414c8072074113d29cdb8cdb59
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
The oslotest package distributes a shell file that may be used to assist
in debugging python code. The shell file uses testtools, and supports
debugging with pdb.
To enable debugging, run tox with the debug environment. Below are the
following ways to run it.
* tox -e debug module
* tox -e debug module.test_class
* tox -e debug module.test_class.test_method
Change-Id: If0b06dcf094682401c4b09dd72493c678ea2a6b0
To test this I ran the pep8 tox env with python3 set - and lo and behold
there was a python3 mistake in a functional test. Whoops.
Change-Id: Ia93a2a85e420d164d67abee479ad498b5e6d3167
The script to install the git versions of the libraries wasn't working
because it wasn't installing over top of the versions already installed
by pip. So by adding an uninstall first, we ensure that the git version
is actually installed.
Also, add a pbr freeze to the end so that we can verify, and some +x so
that we can see the output of our scripts.
And: novaclient 8.0 doesn't have these calls anymore. However, the tests we
had on legacy clouds were erroneously installing the wrong version of
novaclient so we did not catch it. Doh. This has to do the tests and the
calls in the same patch because the fix to the gate job to install the
correct verison of the library exposed the fact that we had be broken
for these for a few minutes.
Depends-On: I208e8c009d0438de19cd3eb08dc45ddebb45d3e9
Change-Id: I4fd882aeb8373b94c7f6b54d97b457042b324361
Remove heatclient and magnumclient from install-tips
We do not consume them anymore, so do not need to install them as part
of our tips testing.
Install from pip using upper-constraints. To ensure we work with
OpenStack releases.
Change-Id: I98f39d2e2a591eb84a1ebcd033eb51e1758f1f39
The explanation for what's up with pep8 checks is a little different
than it used to be. Get it up to current.
Change-Id: I2c03a5aec02dd41ed5cdfb4c4082e17339ed2765
I agree - bare except is bad - it can cause ctrl-c to stop working,
which is totally evil. (I mean, unless that is the intent, in which case
it's the right thing to do. None of these cases are cases when we desire
ctrl-c to stop working)
Change-Id: Ieffa26e8da77199c9ef7238a6c9f0704fc581ba6
As shade is no longer an Infra project, it's no longer appropriate to
ignore hacking. Luckily, shade is mostly hacking clean anyway, so this
isn't terribly disruptive.
Change-Id: I607f1835abb328e3b4a4a33d80a1848ab11779be
We had the normal infra pep8 ignores marked, but follow some of them by hand
in this codebase anyway. While E12* are not valid pep8, the prevailing style
of shade is in agreement with them. While we weren't enforcing them, a few
instances snuck in. Fix them and just turn the flags on.
Change-Id: Iea2bd9a99eb8b20dd40418ac8479b809d3872de8
Add the sphinx files needed for a separate release notes document build.
Change-Id: I176e70614051e0d830fb59b05da2248bd484e57a
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
shade has a functional test that intends to test shade against the
current tip of client libs. Unfortunately, what it's really doing is
installing latest release of the library into the shade virtualenv
that's used for functional testing and using tip of library for the
OpenStack install.
This is not a combo we care about.
Instead, install the library tips into the virtualenv. To do this, make
a functional-tips venv for tox, and make the post_test_hook optionally
use it.
Change-Id: Ibac2982e88439362c7af933c3a07c4d581ee6f2b
No need to install runtime dependencies nor to actually install
Shade in order to generate the documentation. So just don't.
This speeds up a bit the doc generation.
Change-Id: I2264cfbcb53171b345e1a923111c48d2d063f757
The shade functional tests are hardcoded to use the cloud configuration
that is typically provided by devstack. It turns out that shade
functional tests are a useful way to quickly test that a cloud is up and
configured.
Allow providing new values for flavor, image and cloud variables so that
the functional tests can be run on a non-devstack cloud.
Change-Id: I90ab125be77091eaf16ae16e47f4336d4ef49880
We really should run py35 tests when we run "tox" without any
arguments.
I0d6c8c8255717770c7e3297bfe5d6130e983d5b0 is going to make
the py35 job voting.
Change-Id: I8c9b459dfaf1e29e7e8321bfd34061d3d2ad5249
It literally doesn't matter, but also getting deprecation warnings is
equally silly. Change the deprecated things to the non-deprecated one,
and then enable the check that prevents this from happening in the first
place.
Change-Id: Icd714da7ee881fad0c201e9cd56b32a4a330a431
I frequently have random test files and virtualenvs scattered in my
working directory, so tox -epep8 gets frustrating. We don't have any
files that need to be linted that are not in the shade directory - so
go ahead and explicitly limit the invocation.
Change-Id: I16d8f477ae08a1e54724991ccf4a169ae3b35369
Instead of mocking the clients, use keystoneauth1.betamax
fixture to intercept keystoneauth.construct_session, and provide
our own recorded fixtures.
Change-Id: I7b2973b0f89b66c19d6bf10571c3c93692107aa3
It would be *really* cool and useful and stuff to be able to run
the Ansible playbooks against more than just devstack. This change
allows that. Now you can send the -c option to the tox command line:
tox -e ansible -- -c coolcloud
Or, specific tests:
tox -e ansible -- -c coolcloud auth network
Going against devstack is still:
tox -e ansible
tox -e ansible auth network
Change-Id: I666a09aee3d283865c3813d67edfb75123057c22
Now that the Ansible module tests can be run via tox, it
might be nice to allow developers the ability to selectively
run individual module tests (accomplished via Ansible tags) from
tox.
Change-Id: I38a3040a7157a9bcf1cda76e26ab11577e9f80a6
The keypair test needed adjusting so that it would work in
the gating environment, and anywhere an SSH key may not be
available.
Change-Id: Ic9bf41c2b4041911d05217ad3748e097326bac3a
If the local host looks like it can route IPv6 and we have an IPv6
address, and the user has not indicated that they must use IPv4 for
some reason, return it to them in the interface_ip field. Also, always
return something in interface_ip if possible.
Change-Id: I3544280cab7abfa6b4154244f4c4588bc65c7347
Depends-On: Ib0c4c4e8b3b7b4bcee5fa3414719969274929b9a
Co-Authored-By: James E. Blair <jeblair@linux.vnet.ibm.com>
Contrary to popular belief, this does not mean "also check this".
It means "only check this and don't check anything else". So this
was testing _only_ H321.
Change-Id: I8ae173e62d57232cec1bf751004fe4213214353b
tox 2.0 isolates tests from environment variables by default now.
Once devstack emits clouds.yaml we can remove this and consume that.
Change-Id: I8e8c769bbdb3f467af0802e1d49f5ebd84663a8f
This could all be made much fancier - but in general, for now, kill
concurrency until we can get much richer isolation put in - and make
sure that we're only cleaning up servers that we created in the test.
Change-Id: Iea341076f55f41573ee2bb0f378c8602d21b39a2
Also, modified tox.ini to add a 'functional' stanza and
the testenv now runs only unit tests.
Change-Id: Id8a1193c829f7f3ab764c334b1f796f19f447fdd
Depends-On: I1cf58e6a4cf728c5d2a32d602d9dfae1d4dfd62c