129 Commits

Author SHA1 Message Date
Dirk Mueller
6ba3ebbf8d Start using PyFlakes and Hacking
Instead of globally ignoring Pyflakes and Hacking
warnings, blacklist explitly only those that trigger
numerously. Fix the rest alongway and start to gate
on those that are now passing.

Change-Id: Ia19dc708cf0ccab2da5b46d1652f16e901499c24
2013-11-05 14:23:53 +01:00
Monty Taylor
d0314c0973 Rename requirements files to standard names.
Change-Id: Icde92cdff054f8c1efb4a518ab7cf166a8eb791a
2013-07-30 00:34:26 -04:00
Chuck Short
a72b2d64b1 python3: Introduce py33 to tox.ini
Introduce py33 to tox.ini to make testing with
python3 easier.

Change-Id: Iddb14c65c0bf44612bdf8e301e31ab71ea432f29
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-06-01 16:49:31 -05:00
Monty Taylor
66b3e5ec83 Use flake8/hacking instead of pep8.
Change-Id: Ia99bc9116d7d8b558002b302cafe354d05d57f72
2013-05-03 11:28:22 -04:00
John Bresnahan
039f3d8a59 Convert scripts to entry points
The executable programs used by Glance have historically been scripts
in the ./bin directory.  This patch converts all of the scripts to
entry_points.  This change makes these programs python modules.  Thus
they can be imported and methods in them can be called just like any
other module.  This will allow the tests to call into these programs
directly instead of having to fork out a process.

The conf.py file in the doc tree was causing a name collision with
the python module cmd.  The glance/glance directory was being added
to sys.path which made glance.cmd import with the name cmd.  This
patch also fixes that problem.

blueprint: refactoring-better-faster-stronger-functional-tests
Change-Id: I67ae14b7403af31a5944befcd2ec27a690e81f15
2013-04-29 14:08:29 -10:00
Mark McLoughlin
98552376f3 Use oslo-config-2013.1b3
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.

Add the 2013.1b3 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.

Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other
deps get installed with easy_install which can't install oslo-config
from the URL.

Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).

Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
2013-02-19 10:19:36 +00:00
Dan Prince
4039f3aa3c Make tox.ini run pep8 checks on bin.
This updates the pep8 checks in our tox.ini file so that we are
also scanning the bin directory.

Change-Id: I2c0520c1239fcbda6b5b70f2d20709b96b94a4c5
2012-11-09 12:58:50 -05:00
Mark Washenberger
54607f764d Clean up is_public filtering in image_get_all
Prior to this patch, is_public filtering was applied in a
counterintuitive and potentially dangerous manner. In particular,
is_public=True would return images where is_public=False. Also, in a
variety of cases (that weren't exposed in the http api) users could list
private images that they do not own. This patch fixes those problems by
making is_public filtering work the same as any other filter and adding
separate visibility restrictions that always apply to list queries. To
preserve the existing behavior of the v1 api where admins by default do
not see all private images, admin contexts are deescalated to normal
contexts in certain situations.

With this change, pep8 ignores E712 because it is normal to use
"column == True" in sqlalchemy.

Fixes bug 1060481.
Fixes bug 1061331.

Change-Id: I086bd9273e337ebe184902b6f12bc8c9a7fc5867
2012-10-23 15:39:18 -07:00
Rainya Mosher
1a20651030 Setup the pep8 config to check bin/glance-control
Fixes bug 1067518.

Change-Id: I01abbf9571f303b5d20739312300a2f6b9d5a7b7
2012-10-16 14:30:32 -07:00
Zhongyue Luo
cb64f58b99 Clean up pep8 E128 violations
Fixed E128 errors
All ignores are to be removed in the next sequence of patches

Change-Id: I3ccff7df8c382f83ae6aa9aa6a7f16324c3aec75
2012-10-09 10:04:19 +08:00
Zhongyue Luo
c05dd1c819 Clean up pep8 E127 violations
Fixed E127 errors.
All ignores are to be removed in the next sequence of patches.

Change-Id: I56839ebe63dbccbb830dfed8923892c7c0837d7e
2012-09-29 19:01:21 +09:00
Zhongyue Luo
305a9c12b5 Clean up pep8 E124 violations
Fixed E124 errors
All other ignores are to be removed in the next sequence of patches

Change-Id: Ic96ebf5dff645dfdc47478beeb6965d6ad266243
2012-09-24 09:32:11 +08:00
Zhongyue Luo
9f9f22cd80 Clean up pep8 E122, E123 violations
Fixed E122, E123 errors.
All other ignores are to be removed in the next sequence of patches.

Change-Id: I4b3edd9d1b2804ea7de255136da01b19f32abe1c
2012-09-19 16:41:51 +08:00
Zhongyue Luo
ba3d3728d1 Clean up pep8 E121 violations
Fixed E121 errors.
All other ignores are to be removed in the next sequence of patches.

Change-Id: I5d3f490a1bfbe1945a23a7fc1f38d818c0650ff7
2012-09-19 14:55:02 +08:00
Zhongyue Luo
f071f07795 Clean up pep8 E502, E711 violations
Updated pep8 version requirement to 1.3.3.
Fixed E502 and E711 errors.
E711 is ignored because of sqlalchemy statements.
All ignores are to be removed in the next sequence of patches.

Change-Id: I27155166a60be14521d958e1cc7c06ebcc90f1fd
2012-09-18 10:10:01 +08:00
Brian Waldon
802b9cb84b Ignore openstack-common in pep8 check
Change-Id: Ic48b12918f8e3ca439917a614927b41cd099c63a
2012-07-09 14:39:29 -07:00
Mark Washenberger
f07a4db6cd Revert "Funnel debug logging through nose properly."
This fixes bug 1015613

This reverts commit 95fb6e5f8988079d7dffe3a039f1ebd697199eb8.

Change-Id: I827475c86d6f9166c0ee3ba9b0cc9a0a5105c049
2012-06-20 15:25:49 +00:00
Monty Taylor
95fb6e5f89 Funnel debug logging through nose properly.
Change-Id: Ic76289c702ed54c9bf7b9fa4cb140d62049dfb9e
2012-06-18 18:31:09 -07:00
Monty Taylor
898e732bd7 Just use pure nosetests.
The test suite can be run now with pure nosetests + the openstack nose
plugin. There is no longer any need for the run_tests.py.

Change-Id: Iad89a2c1cc567ba10919a52166b3309edef20009
2012-06-04 15:29:26 -04:00
Monty Taylor
66108d0e48 Fix coverage jobs. Also, clean up the tox.ini.
Change-Id: I85e8f1b190e2c5f598ae76f2920dfbe7c4ed1500
2012-06-04 15:29:26 -04:00
Brian Waldon
a7b8e62556 Lock pep8 at v1.1
Update offending files to pass pep8 v1.1 and lock our deps on this
new version.

Change-Id: I5380f213f8e2f62d75f513c8b4496f78fc692dad
2012-05-24 07:47:20 -07:00
Brian Waldon
9d3fd0598f Lock pep8 to version 0.6.1 in tox.ini
Change-Id: Ib88f57a08bb8ba8bd7970300716d84a2a2e2a411
2012-05-24 06:21:17 -07:00
Eoghan Glynn
c00ba7db26 tox tests with run_tests.sh instead of nosetests
In order to ensure the glance-logcapture plugin is loaded dynamically,
we configure tox to drive tests with the run_tests.sh script intead of
calling nosetests directly.

This is intended as a temporary measure, pending promotion of the
glance-logcapture plugin to openstack-nose.

Change-Id: I556c751f4c2d31c1cbacd42d835ab436fb8f6988
2012-03-19 22:37:41 +00:00
James E. Blair
95efaf0a67 Fix typo in tox.ini.
My last commit message was right, the code was wrong.  It's tox:jenkins.
Commands are invalid in tox: sections, so we'll get pip freeze run
another way.

Change-Id: Iafa21ff47cf5e3d8f57676be93e2fa6a0d0ab9b4
2012-03-09 23:58:14 +00:00
James E. Blair
cb70ff9f51 Update tox.ini for jenkins.
The tox documentation is wrong, it looks for [tox:jenkins] instead
of [tox:hudson].  Also, run "pip freeze" before running tests from
within the virtualenv so we have a record of all versions used
in each test run in Jenkins.

Change-Id: Id0f34247f4545268f21dacb860d2e0fe72677a11
2012-03-09 02:11:57 +00:00
Monty Taylor
d26f66bce5 Align to jenkins tox patterns.
Split requires in to pip-requires and test-requires.
Updated install_venv to know about test-requires.

Change-Id: I739f42c8676c40e2203cc0bc4aa9763ffac999a9
2012-02-25 17:39:00 -08:00
Monty Taylor
f0832fdd88 Add a generic tox build environment.
Allow for the running of arbitrary commands inside of a venv
so that we don't have to make tox envs for every blessed thing we want to
do.

Change-Id: Ia6f9e3cbeaef27ffe1e60b424c2a2d384e6bad0b
2012-02-10 23:39:30 -08:00
Monty Taylor
eea25b4149 Prep tox config for jenkins builds.
Change-Id: Id81588d3a2aabc0931d5bf12f078d8f770305e69
2012-02-06 08:31:49 -08:00
Monty Taylor
4d7f2afb1d Add tox.ini file.
The tox.ini drives the current test suite in multiple virtual envs, so this
is a first step in trying to get multi-version testing.

Change-Id: I9c28ee11aa7bbe1b221a72e0ee8cc51d788f73c9
2011-12-30 14:03:15 -08:00