5c93d6f238ce2614cc7b058e584e2273c2079603
Commit Graph

90 Commits

Author SHA1 Message Date
Thiago da Silva
98e9554291 remove func-fast-post from tox.ini
Following up on patch 417209.
Fast post is now the default mode, so there's
no more need for a fast-post specific testenv.
Change-Id: I6faf8fcfa0a1d96aaf0f5e0ad2106b2b416da22f
Signed-off-by: Thiago da Silva <thiago@redhat.com>
2017年01月25日 11:14:26 -05:00
Tim Burke
4ee20dba48 Default object_post_as_copy to False
Additionally, emit deprecation warnings when running POST-as-COPY
Change-Id: I11324e711057f7332577fd38f9bff82bdc6aac90
2017年01月20日 12:37:01 -05:00
Jenkins
bcaaf725fe Merge "Update the tag for Swift tox test" 2017年01月11日 18:04:46 +00:00
kellerbr
aa17ae1b04 Allow Hacking H401, H403 check
Currently swift ignores a lot of the Hacking style guide. This patch
enables the H401 and H403 checks and fixes any violations. With this
we can get a little closer to following the OpenStack style guidelines.
Change-Id: I5109a052f2ceb2e6a9a174cded62f4231156d39b
2017年01月04日 17:23:46 +00:00
Andreas Jaeger
a0345cb287 Move bandit to pep8
The bandit gate is passing, let's make it voting.
Since bandit is a security linter, add it to the linter target - called
pep8 - and run it there. This will save the CI systems spawning an extra
test machine for this.
Needed-By: I90e5401ee8e46a2a153adb62d0f99a8a88a686b8
Change-Id: I75eeefa2441466da60b9b206769a2e64e9c1e7a9
2016年12月20日 07:30:43 +00:00
tone-zhang
d58064c207 Update the tag for Swift tox test
Change default py3x to py35 in tox.ini to support python3.5,
and fix the error when run tox test for Swfit.
Closes-Bug: #1649773
Change-Id: I8e26183ffe270518503da8b5aa394e99ae4cd8c6
2016年12月14日 07:15:48 +00:00
Lokesh S
84aa6558b4 Py3: Make test_manager py3 compatable
Fixes: NameError: name 'file' is not defined
file() is removed in python3.x using open()
 will solve it.
Fixes: AttributeError: 'generator' object has no
attribute 'next'
Python3 it is __next__()
Change-Id: Ib2cbdfbbedb86f6e01239d2ee991677727b0548b
2016年12月12日 22:19:39 +00:00
Jenkins
962a17528b Merge "Add python3-dev to bindep and use py27for some envs" 2016年12月12日 20:25:24 +00:00
donagh-mccabe
052ca666cb Add python3-dev to bindep and use py27for some envs
Installed my workstation with Ubuntu Xenial and then hit a few
snags running tox.
python3-dev is needed to build the python3 envs. Did not actually
test python3-devel (rpm) as I don't have such a system.
While python2.7 is the default, tox (on Xenial) itself uses
python3.5, hence 3.5 becomes the basepython and a number
of envs don't work.
Driveby, removed warning about /bin/echo in py3pep8
Change-Id: Ie880246dd757570b8e444da0e643f3c50093bdc5
2016年12月12日 18:14:17 +00:00
Jenkins
e102e9b966 Merge "Drop "--allow-insecure netifaces" from tox pip install" 2016年11月29日 02:14:37 +00:00
Jenkins
609b092d1e Merge "use the new upper constraints infra features" 2016年11月25日 10:40:25 +00:00
Alistair Coles
846289ef40 Drop "--allow-insecure netifaces" from tox pip install
Follow up to [1]. The --allow-insecure switch is no longer
required for netifaces.
[1] Related-Change: I7c60be623b4340ee34ae1aa520f17b303348811d
Change-Id: If893cdeff68ae5b279ea7055c078b0c1247ae7f2
2016年11月24日 11:46:19 +00:00
Ondřej Nový
5d7a3a4172 Removed "in-process-" from func env tox name
This shorten shebang in infra, because we are hitting 128 bytes limit.
Change-Id: I02477d81b836df71780942189d37d616944c4dce
2016年11月19日 23:24:30 +01:00
Jenkins
7b69efe1b6 Merge "Py3: Fixes header key dict" 2016年11月11日 13:32:07 +00:00
John Dickinson
e6dea4d699 adding reno sphinx tree
This should give the necessary tooling to set up the right
links in the right places so Swift has release notes listed
alongside other projects.
Change-Id: I4e5f1ce1fcfbb2943036c821a24a0b4a3a2d9fc8
2016年11月10日 21:34:14 +00:00
Lokesh S
2f31c0469d Py3: Fixes header key dict
Decode header to latin1 on python3
encode header to utf-8 on python2.
Co-Authored-By: Alistair Coles <alistair.coles@hpe.com>
Change-Id: I10f205a05bb3a566e52a597d9315b3a8b8c14664
2016年11月08日 12:22:12 -08:00
John Dickinson
91ce1bb114 use the new upper constraints infra features
Change-Id: I7c60be623b4340ee34ae1aa520f17b303348811d
2016年10月19日 09:18:52 -07:00
Jenkins
59066615cf Merge "remove comment saying we ignore H233. we actually check it" 2016年09月19日 16:59:36 +00:00
Jenkins
93b02c931f Merge "Turn on F812 check" 2016年09月19日 16:35:17 +00:00
Jenkins
6fea41e0f6 Merge "Updating Bandit config file" 2016年09月19日 00:33:04 +00:00
Tim Burke
a741998bff Turn on F812 check
F812 list comprehension redefines <variable> from line ...
While the current violations were benign, this sort of code can easily
lead to subtle bugs. Seems worth checking, especially given how cheap it
is to bring existing code in line with it.
Change-Id: Ibdcf9f93b85a1f1411198001df6bdbfa8f92d114
2016年09月16日 14:44:37 -07:00
John Dickinson
70e3cf15bf remove comment saying we ignore H233. we actually check it
Change-Id: Ia78fbb32aa6f45aa6578734dc43f3262e717bab8
2016年09月16日 13:12:51 -07:00
Travis McPeak
b587d1606c Updating Bandit config file
This commit updates the Swift Bandit file to the new style
introduced in Bandit 1.0. In response to the struggle with
getting a Bandit config file working and kept up to date we
introduced a simplified version in Bandit 1.0.
This commit updates Swift's bandit.yaml to use the new version.
Change-Id: Ida5dd08f4ea72a377346f2159caeb2f3741d4980
2016年09月16日 09:20:34 -07:00
Victor Stinner
8b3c04a4aa py3: Port test_splice to Python 3
* add NamedTemporaryFile() wrapper
* use byte strings for binary data in tests
* tox.ini: run test_splice on Python 3.4 and Python 3.5
Change-Id: I042d739fbf29433733bf0c2154749bc90b210416
2016年09月05日 12:20:53 -07:00
Victor Stinner
d98928caa9 py3: tox.ini: use substituation to py35 commands
Use tox substitution to avoid duplicating testenv:py34 commands in
testenv:py35, to not have to maintain the whitelist of Python 3 tests
in two different places.
Write also the list of tests in a newline to be able to more easily
add new unit tests.
Change-Id: I6e7f238f1c5d3fc9b6560918dcbb93e9dd8ec084
2016年08月22日 10:44:17 +02:00
Alistair Coles
ce49a296c6 Add rm to tox whitelist_externals
Avoids a warning when running tox -e api-ref
Change-Id: Ib02849075e6424f1db84499fd7500d7bb76dde67
2016年08月17日 17:20:21 +01:00
Jenkins
ea961cfef2 Merge "Have py35 tox env match py34" 2016年08月09日 18:20:32 +00:00
Janie Richling
66520146cf Enable in-process func tests to optionally use encryption
Running functional tests in the in-process mode uses
the default value for the pipeline. This patch adds support
to specify the SWIFT_TEST_IN_PROCESS_CONF_LOADER variable
to point to a labeled function that changes the proxy
configuration for the functional test.
The patch also adds a new tox environment
func-in-process-encryption
which runs with the environment variable
SWIFT_TEST_IN_PROCESS_CONF_LOADER=encryption
The motivation for this change is to put support in place for an
upstream CI job that will functionally test using encryption
middleware in the pipeline. The gate job is proposed at:
https://review.openstack.org/#/c/348292/
Change-Id: I15c4b20f1d2be57ae21c69c614f6a9579145bee9
2016年07月28日 14:19:48 -05:00
Tim Burke
9890184ea9 Turn on H233 and start using print function
As much as anything, I'm just tired of seeing a bunch or piecemeal
fixes.
Note that we *need* to include
 from __future__ import print_function
in order to support things like
 print() # Would print "()" (the repr of an empty tuple) otherwise
 print(foo, end='') # Would SyntaxError
 print(bar, file=sys.stderr) # Would SyntaxError
Change-Id: I8fdf0740e292eb1ee785512d02e8c552781dcae1
2016年07月08日 16:19:52 +00:00
Tim Burke
da317f01c6 Run flake8 against scripts in bin
Just having a `flake8 --filename=swift* bin` command is insufficient.
Change-Id: Ia2a5c364e52d9972d31e6b5e22366503894b720d
2016年07月08日 06:42:48 +00:00
Petr Kovar
cf8b93918c Add install-guide for swift
This adds swift-specific contents from the OpenStack Installation Guide
in the swift repo per [1]. A separate change will remove the swift contents
from the OpenStack Installation Guide for Newton per [2].
The swift install-guide structure is based on the Install Guide
Cookiecutter [3].
Also adds tox.ini environment for install-guide and adds
openstackdocs-theme to test-requirements.txt.
[1] http://specs.openstack.org/openstack/docs-specs/specs/newton/project-specific-installguides.html
[2] http://specs.openstack.org/openstack/docs-specs/specs/newton/installguide.html
[3] http://git.openstack.org/cgit/openstack/installguide-cookiecutter/
Change-Id: I59b92eebaf5acc657b97bcf10d9ff2cf2db05885
Partially-Implements: blueprint projectspecificinstallguides
Depends-On: Ifebc65b188c4f2ba35b61c0deae5ec24401df7f9
2016年07月07日 08:00:21 +02:00
Tim Burke
401311ff6a Have py35 tox env match py34
Very few of our tests can actually be run under py3. The ones that can
should still pass on py35, though.
Change-Id: Iaf9aaa296e3b21aa0ee513c479a50f3796787f32
2016年07月05日 10:24:02 -07:00
Cloud User
4b13879680 Adds migrated API reference files
This brings in RST plus YAML files, migrated from the source for [0].
The migration explanation is found on the openstack-dev mailing list [1].
Project instruction is in the OpenStack Documentation Contributor Guide [2].
A patch for publishing this source is in [3].
The conf.py and the tox environment are standard across other projects.
[0]http://developer.openstack.org/api-ref-objectstorage-v1.html
[1]http://lists.openstack.org/pipermail/openstack-dev/2016-May/093765.html
[2]http://docs.openstack.org/contributor-guide/api-guides.html
[3]https://review.openstack.org/#/c/313015/
Change-Id: Ifebc65b188c4f2ba35b61c0deae5ec24401df7f9
2016年06月21日 19:14:22 +02:00
Tim Burke
226557afc4 Turn on H703, so our translators don't punch us
Change-Id: I4ce3068f79563e4d4296c6e1078bc12f0cf84c96
Related-Bug: 1559431
2016年05月23日 18:46:29 +00:00
Andreas Jaeger
92274d4790 List system dependencies for running common tests
Add an other-requirements.txt file containing a cross-platform list of
dependencies needed for running included tox-based tests. Also include a
tox environment for convenience calling the bindep[*] utility to list
any missing system requirements.
Document bindep and other-requirements usage.
This change is self-testing.
For other-requirements.txt see also
http://docs.openstack.org/infra/manual/drivers.html#package-requirements
[*] http://docs.openstack.org/infra/bindep/
Change-Id: Iea6f5fecba3b7cb9f6dac7029c0f17fc31fc0e3c
2016年05月12日 08:51:31 +02:00
Jenkins
032850357c Merge "clear pycache and remove all pyc/pyo before starting unit test" 2016年03月16日 11:38:22 +00:00
Olga Saprycheva
d6b4587a55 Removed redundant file for flake8 check
Change-Id: I4322978aa20ee731391f7709bbd79dee140fc703
2016年03月08日 10:57:56 -06:00
Olga Saprycheva
2cff2dec3d Fixed pep8 and flake8 errors in doc/source/conf.py and updated flake8 commands in tox.ini to test it.
Change-Id: I2add370e4cfb55d1388e3a8b41f688a7f3f2c621
2016年03月07日 10:39:37 -06:00
janonymous
be54d0c928 clear pycache and remove all pyc/pyo before starting unit test
Delete python bytecode before every test run.
Because python creates pyc files during tox runs, certain
changes in the tree, like deletes of files, or switching
branches, can create spurious errors.
Closes-Bug: #1368661
Change-Id: Iedcb400fa3b0417f5bb8e943b17758fcfb4070c6
2016年03月04日 17:32:12 +00:00
Jenkins
01b07026c0 Merge "Changing the base version to python2.7 for pep8 checks" 2016年02月22日 19:40:27 +00:00
janonymous
f05da4c8fa Changing the base version to python2.7 for pep8 checks
tox was taking python3 as it's base version which lead to
tox pep8 check failing on local env:
http://paste.openstack.org/show/486183/
Change-Id: Ia822ec5b5e12a1fc30b676f1e6d95e287b9b3368
2016年02月06日 16:59:57 +05:30
Alistair Coles
c7e5e12500 Enable in-process func tests to optionally use fast-post
Running functional tests in the in-process mode uses
the default value for proxy-server object_post_as_copy,
which is True. This patch adds support for an environment
variable to change this value to False so that the fast-post
mode is tested when running in-process functional tests.
The patch also adds a new tox environment func-in-process-fast-post
which forces in-process functional testing with
object_post_as_copy=False.
The motivation for this change, apart from enabling configurable
local testing, is to put support in place for an upstream CI job
that will actually functionally test the fast-post mode, which is
otherwise only covered by unit tests.
There are currently two gate jobs that run the functional tests:
- gate-swift-dsvm-functional runs the tests *twice* against a
 devstack swift service, once using tempauth and once using
 keystoneauth. The devstack swift service uses the default
 object_post_as_copy=True.
- gate-swift-tox-func runs the func tests in in-process mode
 which also uses tempauth and object_post_as_copy=True. This
 duplicates one of the config scenarios above.
With this change either the gate-swift-tox-func job or a new job
could run the functional tests using object_post_as_copy=False.
Change-Id: Ia37f6df1dc38e44ef7404fbf0a52f6fc22fae0c2
2016年02月01日 12:39:39 +00:00
Jenkins
ef8ae0a8ce Merge "Modify functional tests to use ostestr/testr" 2015年12月16日 07:25:16 +00:00
Richard Hawkins
9d7f71d575 Modify functional tests to use ostestr/testr
Defcore uses Tempest, which uses Test Repository.
This change makes it easier for Defcore to pull functional
tests from Swift and run them. Additionally, using testr
allows tests to be run in parallel.
Concurrency set to 1 for now, >1 causes failures for
reasons that are still TBD.
With switch to ostestr all the server logs are being sent to stdout
which makes it completely unreadable. Suppressing the logs by default
now with a flag to enable it if desired.
Co-Authored-By: John Dickinson <me@not.mn>
Co-Authored-By: Robert Collins <rbtcollins@hpe.com>
Co-Authored-By: Matthew Oliver <matt@oliver.net.au>
Co-Authored-By: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
Change-Id: I53ef4a116996a772cf1f3abc2eb0ad60047322d5
Related-Bug: 1177924
2015年12月15日 22:30:44 +00:00
Ondřej Nový
ca2dcc3719 Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0
More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching
Change-Id: I9451a0f0dee5c5a3c0ca0a52f58bd353602661a2
2015年12月11日 18:09:31 +00:00
Victor Stinner
bdb7bf4032 py3: Add py34 test environment to tox
Add a py34 test environment to tox.ini using a whitelist
of tests which pass on Python 3. Currently, only test_exceptions.py
of test/unit/common/ is run on Python 3
Change-Id: I5c8a9fe7b9635f1acab8f401908975fc6fc58c7a
2015年11月20日 09:00:59 +01:00
Christian Schwede
767fac8186 Enable H234 check (assertEquals is deprecated, use assertEqual)
All usages of assertEquals and assertNotEquals are fixed now, so let's enable
the H234 check to avoid regressions in the future.
Change-Id: I2c2ccb3b268cf9eb11f2db045378ab125a02bc31
2015年10月12日 07:40:17 +00:00
Jenkins
f0af259aae Merge "pep8: Don't override '_' symbol" 2015年08月26日 19:51:54 +00:00
Jenkins
ff7eb0c6d5 Merge "Allow pep8 of a single file" 2015年08月26日 08:11:57 +00:00
Samuel Merritt
a7b84f4c51 Allow pep8 of a single file
Now you can run
 $ tox -e pep8 path/to/file.py [path/to/file2.py [...]]
to run pep8 against just those files[1]. This is quite a bit faster
than a full pep8 run, and the faster feedback is nice when you're
fiddling with some formatting to placate pep8.
Of course, you can still run "tox -e pep8" to check the whole source
tree, just as before this commit.
[1] It'll still run against bin/swift* as well, but that's still a lot
faster than running against all our .py files.
Change-Id: I81b4363fb95a34ff0f5c346b2b24f2047154f502
2015年08月24日 23:11:34 -07:00