While running `tox` command in binoic env, we see the following
message,
ERROR: InterpreterNotFound: python3.5
It is because the default py3 version for binoic is py36.
This patch adds the env in OSC also maintaining consistency
with setup.cfg
Change-Id: I8e5cf72901cba34ad44f2b356609f85b3b0c431f
In order to support switching auth contexts, such as for registered_limits
which take a system scoped token, switch the functional tests to using
the --os-cloud command line parameter. However, honor the OS_CLOUD env var
as a way that someone can select a different cloud, including 'envvars',
to use.
Use devstack-system-admin cloud for limit tests
Keystone requires these to have system scope now.
Change-Id: Ia81eebd3e00ae986cf3ba7e3d98f3e8a1647b622
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: I051f1c18b719a27372b626d483e47327085dd3b7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
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: I4a4ca9726fab1d0cf9a33311201b7f65951a0942
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Change I7e8c47dead1e019e8705db3ff7559dd39b1d90d9 broke
the ability to create a new release note from the venv
tox target because the reno requirement was moved from
test-requirements.txt. This fixes it.
Change-Id: Ifac83121388728fa445e0ed4433c9d981c057737
The zuul job figures out whether to run "setup.py build_sphinx" or
"build-sphinx" based on whether the project is relying on pbr's
ability to auto-generate API reference docs. Because we are relying on
that, we want local builds to use "setup.py build_sphinx".
This reverts commit 42e0037cd055d81d9452f046c347f8e469d27350.
Change-Id: Ia01188110fa9c3ccaf3d794fa3a511a6780e683e
This commit makes to use stestr instead of ostestr
directly. ostestr>1.0.0 has started to use stestr instead of
testrepository. So there is no reason to use ostestr anymore.
Change-Id: I6327d50c9f6dd19f1de24b9b51532104fb3e916e
Do a dummy import to determine which SDK is installed (Pre/post merge).
This solves the DevStack error "Cloud defaults was not found" in -tips jobs.
Depends-On: Ia111f127fbdceac2afe20fd9d1fe032145cdd72c
Change-Id: I60c2d418dd5a393eee2cc2a5c2fdebfffdabf2d3
'pip install -U' ugrades specified packages, this is not necessary
since we use constraints, remove the parameter '-U' from the line.
With tools/tox_install.sh - which a previous change of mine removed -
the -U was not harmful, but with the current set up, it might cause
upgrades, so remove it.
Change-Id: I9f818d4b78e7540498a1501be14cd63ac3e891b3
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: Ie7c06ead39c8597ec9326f223625d1fa0d5208d1
Both of these can severely break openstackclient. Add them to the
required-projects list of the tips jobs. We should then add at least
osc-tox-unit-tips but maybe also osc-functional-devstack-tips to both
cliff and keystoneauth so that it's symmetrical.
Change-Id: Ie0f3e9d7e221c9cdd3c5d726148f456246186ff4
* Add unit-tips job to run unit tests with the same project master branches
as the functional-tips job (mostly useful for the unit.integ tests)
* Add irrelevant-files to the osc-functional-devstack-base job
* Comment out the functional-n-net job as it is horribly broken for now
until the replacement package-installed OpenStack is ready
Change-Id: I5acdcb0a2f0f0dfe488740ae0add36366cc0ee21
The functional tests assume that an openrc file has been sourced. Make a
simple wrapper that will do that.
Change-Id: I42584aaebcbca99a8c922f6ff90c8bbce57bbfbb
To ensure project imports are placed after third party import,
we need to specify application-import-names.
Previously flake8-import-check checked only standard imports or not.
Change-Id: Iad7afa456cec7cf5b44955f1ea03c593a4c0e426
In reviews we usually check import grouping but it is boring.
By using flake8-import-order plugin, we can avoid this.
It enforces loose checking so it sounds good to use it.
This flake8 plugin is already used in tempest.
Note that flake8-import-order version is pinned to avoid unexpected
breakage of pep8 job.
Setup for unit tests of hacking rules is tweaked to disable
flake8-import-order checks. This extension assumes an actual file exists
and causes hacking rule unit tests.
Change-Id: I12b596820727aeeb379bee16c2bc993dee9eb637
Some of the available checks are disabled by default, like:
[H203] Use assertIs(Not)None to check for None
Change-Id: I59dafb62cedc5217b6e5eb6efb997a9ee3c29bbb
The lastest ipdb depends on ipython 6.0, but ipython 6.0
only can be installed in python 3.3 and above, see
http://paste.openstack.org/show/607632/ . If we try to
run "tox -e debug" in python2.7, the install error is raised
and block the function. Remove the ipdb installation, it's
not necessary, we can use pdb to replace.
Change-Id: Ib47bb5925b7a5b1d3a319b58fa219c1b57dccb93
When do the action "tox -e pep8", result is "ValueError: No closing
quotation". Which is caused by the tox.ini. The min tox version is
1.6. In my environment, tox version is 2.2.1. If the tox version is
more than 2.3, the error will not happen.
Depends-on: Iee7b043ac7d381dadf89d26098f69e935ed81d6b
Change-Id: Id10ddf6244e7e25e6f66c97773d426b0b4789479
Currently only py27 and py35 (not py34) is tested in the gate, so
py34 should no longer be part of the tox environment or part of the
PyPi classifier.
Change-Id: I155fc0e3ac06b495718d9fa3058edded738cb011
Pass OS_* options into tox debug venv in order to
debug functional tests in local, and install ipdb
to make code-debug more convenient.
Change-Id: Ib926948f2b9a52921cf7487fe16ef716481e3ceb
The /opt/stack/new directories are owned by the wrong user, so python
setup.py egg_info fails because it can't create the egg_info dir.
Changing the invocation to use git+file:// urls solves the problem.
Additionally, make a correction to test collection.
Change-Id: I39da0b26417dce1a72b15dedc02d10284329307f
Installing directly from the git url will bypass any depends-on
processing zuul may have done on the dependent repos.
Change-Id: I3dadacf7a855cc4efad701f0a6275d6cd60efd72
we can create a new infra job that points to the new test hook,
which should install the master version of the SDK, osc-lib
and os-client-config.
Change-Id: Ib6391893b2302bdc514525d5ddda886fe8c60100
functional tests should be grouped with other tests (unit and
integration tests). as part of this commit the "common" module
was renamed to just "base", this was done for simplicity.
the post_test_hook.sh file was also copied to the functional module
since it should live there. a separate change to the infra repo
will be made to call the new location, once that is merged we
can remove the old one (a new change will also be posted for that)
Needed-By: I49d54f009021d65c1ae49faf6b3f0a7acdadd7b3
Change-Id: Ie8c334f6223373b8e06df8bd8466500d2a2c8ede
Fix argument precedence hack
Working around issues in os-client-config <= 1.18.0
This is ugly because the issues in o-c-c 1.19.1 run even deeper
than in 1.18.0, so we're going to use 1.19.0 get_one_cloud() that
is known to work for OSC and fix o-c-c with an axe.
Remove return values for set commands
'identity provider set' and 'service provider set' were still
returning their show-like data, this is a fail for set commands
now, don't know how this ever passed before...
Constraints are ready to be used for tox.ini
Per email[1] from Andreas, we don't need to hack at install_command
any longer.
[1] http://openstack.markmail.org/thread/a4l7tokbotwqvuoh
Co-authorioed-by: Steve Martinelli <s.martinelli@gmail.com>
Depends-On: I49313dc7d4f44ec897de7a375f25b7ed864226f1
Change-Id: I426548376fc7d3cdb36501310dafd8c44d22ae30
The directory openstack/common from the exclude list of
flake8 in tox.ini was used to keep codes from oslo-incubator,
but oslo-incubator was retired, so don't use this directory
any more.
Change-Id: If1ea5dc167cfe4a09aad413b9eab0af807ebe603
Now that there is a passing gate job, we can claim support for Python 3.5
in the classifier. This patch also adds the convenience py35 venv.
Change-Id: If93af96739741584c87913ba140d0c6cee2aa10d
Currently tox -epep8 will run flake8 on whole code.
To make this fast, flake8 support is added for only
updated(delta) code.
Same can be run by "tox -efast8".
Change-Id: I9c55fed32ae3060c21ec278398e9e07fb4a0fe13
Implements: BP tox-pep8-diff-part-only
This change is being proposed as part of the OpenStack Security Project
working session at the Austin 2016 summit. It adds support for running
the bandit[1] security linting tool against the python-openstackclient
codebase. This change adds a targetted environment for bandit and also
adds bandit as part of the pep8 job.
The bandit configuration has been tailored to exclude tests that are
currently producing warning against the codebase. These issues will be
followed up with bug reports and patches.
[1]: https://wiki.openstack.org/wiki/Security/Projects/Bandit
Depends-On: Iccd81c17e84df03d249c1012277dad9cb68c5845
Change-Id: I691829c1224557d1d239c9f665ac539d0f13c4d3
If “ignore” is not set under flake8 in the tox.ini
file there there are defaults set to be ignored.
The depended patch fixes many of the problems.
Change-Id: Ieed2fe1c4654e201d3fe6d40ef93e247ee736f8b
Doc: http://flake8.readthedocs.org/en/latest/config.html#default
Depends-On: I935ab48e7c5bac5f88ecdb3a05f73fb44fc9f41d
Closes-Bug: #1548910
as of mitaka, the infra team won't have the resources available to
reasonably test py26, also the oslo team is dropping py26 support
from their libraries. sine we rely on oslo for a lot of our work,
and depend on infra for our CI, we should drop py26 support too.
Change-Id: I66d168ecc755a3ea0e01d5b6344d06d9e0d1378b
Closes-Bug: 1519510
From lifeless: pbr reflects the package dependencies from
requirements.txt into the sdist that tox builds.
Change-Id: I63548ec321b9c59cc935ba8179b1da5b9c90e09b
This commit switches to use ostestr for running tests. ostestr
integrates the subunit-trace output that other projects use for test
output. (in addition to some other ui niceties)
Change-Id: Ib5b5225b2a7bfb7897e1efe55181389d1ae095cb