24 Commits

Author SHA1 Message Date
Adam Coldrick
983bb8e2d7 Unpin webob and hacking to fix compatibility issues
The pinned versions of webob and hacking weren't functioning properly
with modern Python, so they are unpinned.

Unpinning hacking brought a number of extra rules into use, so this
commit also contains a number of code style fixes.

There was also an incompatibility in the test_setup.sh script, which
meant it doesn't work with MySQL 8.0 (which is in Ubuntu 20.04). This
is also fixed in this commit.

Change-Id: I0889bc35f8babfeec42f6f577d302bb5fbce1c95
2020-09-11 12:26:47 +01:00
Monty Taylor
45f7ed5a43
Switch to using stestr for tests
OpenStack is switching from testrepository to stestr. Make the shift
here.

Also, while doing this, update the rest of the test-requirements.
testtools and python-subunit are removed because they are transitive
deps of oslotest and stestr already.

Change-Id: Idf1298e03a78653044532fd54a4f35dcf5c6c1c5
2018-10-17 14:24:24 -05:00
ghanshyam
bf72a50942 Gate fix: Cap hacking to avoid gate failure
hacking is not capped in g-r and it is in
blacklist for requirement as hacking new version
can break the gate jobs.

Hacking can break gate jobs because of various
reasons:
- There might be new rule addition in hacking
- Some rules becomes default from non-default
- Updates in pycodestyle etc

That was the main reason it was not added in g-r
auto sync also. Most of the project maintained the
compatible and cap the hacking version in
test-requirements.txt and update to new version when
project is ready. Bumping new version might need code
fix also on project side depends on what new in that
version.

If project does not have cap the hacking version then,
there is possibility of gate failure whenever new hacking
version is released by QA team.

Example of such failure in recent release of hacking 1.1.0
- http://lists.openstack.org/pipermail/openstack-dev/2018-May/130282.html

Change-Id: I50448c8cd470fbb5266a728a9b5ed2e46e1448a2
2018-05-09 02:02:03 +00:00
John L. Villalovos
7e9e1e5c44 Fix PEP8 failures for H236, remove unneeded ignores, use newer hacking
Fix [H236] Use six.add_metaclass instead of __metaclass__.

Remove ignoring of: H233, H234, and H236 as they are passing.

Use hacking>=1.0.0

Change-Id: I310f1161467339c6784bae253e0e3713f23d5218
2018-04-03 13:26:20 -07:00
Doug Hellmann
708d09be77 update documentation build for new PTI
Move documentation dependencies to doc/requirements.txt

Change tox.ini to run sphinx-build directly, like the zuul job does.

Switch from oslosphinx to openstackdocstheme.

Change-Id: I079ff78edacaba673461824af770344cb3a896f2
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-01-12 16:24:59 -05:00
Matthew Treinish
f7556744bb
Bump minimum os-testr requirement to 1.0.0
This commit bumps the os-testr version to use 1.0.0. 1.0.0 changes the
internals to use stestr instead of subprocessing testr. A bunch of
incorrect imports in the tests were updated as a well, relying on
relative import paths is finicky at the best of times so to make the
tests work this just points to the path based on the root of the package
instead.

Change-Id: I2aed3f6a9adeac2b7dbe58ee12c0a1485278d56f
2017-10-16 20:29:39 -04:00
Zara
1cfb51aa65 Pin os-testr to version 0.8.2
This commit pins the os-testr version to 0.8.2, as more recent changes
to the backend mean that some storyboard modules are not found. In the
future, we should adjust storyboard to work with the more recent
os-testr version, either by changing paths to those modules or
by explicitly pointing to them.

Change-Id: Iad68613d294179548d4ca73d75df699b05e7d0d7
2017-09-12 11:54:21 -04:00
Luigi Toscano
146ab70a56 Use ostestr instead of the custom pretty_tox.sh
Switch to os-testr as wrapper for testr, instead of the custom
script pretty_tox.sh.

Change-Id: I5b76cf9ffca530664b1c1ddcbf98679ab4fca8b5
2017-02-09 12:29:41 +01:00
Swapnil Kulkarni (coolsvap)
672eee1b81 Remove discover from test-requirements
It's only needed for python < 2.7 which is not supported

Change-Id: I5215baffc2d995fc8def6463900cc1165370b1c0
2016-07-22 05:03:43 +00:00
Clark Boylan
1a0ce47f8f Use a common requirements file
We can use newer setuptools and pbr to use environment markers in our
requirements files which allows us to select deps if the environment
matches. With this we restrict the email dep to python < 3.0 which is
the only dep we have that doesn't work across python 2 and 3.

Note that this also updates the pbr machinery to pull in this new
feature support. Part of this update requires updating hacking to avoid
conflicting pbr requirements. This in turn has created some churn in the
format of the code but should largely be a noop.

Change-Id: I0be5dd8a6b33a51329077b5a5f4c7f5576829956
2016-07-08 09:06:10 -07:00
Gregory Haynes
ac0f86858d Switch from mysql-python to PyMySQL
mysql-python undesireable over PyMySQL for a few reasons. Mainly, it
does not support Py3* and does not work well with eventlet.

There is also a bug in using oslo.db with PyMySQL where reference errors
are not properly detected. This fixed in oslo.db
ab20754db71e55b79b9e71e36ad86d9befc89a92 but we should still work around
this unless global-requirements are bumped for oslo.db.

Also adding pymysql to requirements since it is a pure python library
and having a codebase that can 'just work' is awesome.

Change-Id: I0058193c7cbd329731ade37108614fa6eb19d0f7
2015-02-17 14:09:16 -08:00
Nikita Konovalov
e136c92ca4 Adding pretty-tox
Tests output looks more informative with it.

Change-Id: I09377a383607c9d4bbb5aa6506bc83e1ced39de0
2015-01-23 17:37:54 +03:00
Aleksey Ripinen
257f991f43 Added oslotest to requirements
Oslotest was added to requirements and
openstack.common.test was deleted.

Change-Id: I499cd19e360d2e37fe4ad598e7afe43e20b99a5b
2015-01-21 13:31:15 +03:00
Michael Krotscheck
5308c2cc52 Removed PostGres from code and documentation
We don't support postgres.

Change-Id: Ia51300c1aa1042ae32f966490ce4265d49fab255
2014-06-09 12:42:05 -07:00
Michael Krotscheck
8fcce8b2e9 Added missing requirements back to storyboard
Prod is broken, because I forgot about libraries. With these two
I was able to get the API running with no test dependencies installed.

Change-Id: I178ddf464495b20f9a94f963cf58ab9f28a3af73
2014-03-27 10:24:31 -07:00
Michael Krotscheck
195cfad727 Added DELETE method for projects, stories, and tasks.
While true deletion of records is a bad idea, we still need an ability to
remove individual items from showing up in searches. This commit aims to
lay the ground work for this, though we'll want to put better permissions
around it.

I could use some help on this - for some reason running the tests dies a
horrible death because it gets confused about the migrations.

Change-Id: Ib0eb2f06553644878fb7bf6ad49a820efcdf22e0
2014-03-07 15:13:33 -08:00
Michael Krotscheck
93b851b719 Updated oslo
A bunch of things in the oslo changed, including the DB api. This
updates them.

Change-Id: Ibd579375ad0be5f7681fca60e44ca7f8c8a89c8a
2014-03-07 15:09:52 -08:00
Thierry Carrez
deba4c5fa8 migrate 0.8.4 is bad, block it
migrate 0.8.4 does a non conditional require on ibm db2 code. This
isn't correct, and that version needs to be blocked.

Change-Id: Ie0fc3450e9253ccf9b1bb8e6c0f1e3b455a0c162
2014-03-03 18:04:11 +01:00
Ruslan Kamaldinov
b9ee7bb72d Orginized test requirements
Change-Id: I75a8019c89b7cda8bfe12f8b17bfe4258cb4c351
2014-01-26 20:42:47 +04:00
Ruslan Kamaldinov
1ce4b9a9f5 Add tests for Alembic migrations
This is the next step towards CI/CD:

This code enables testing of DB migrations against real databases -
MySQL and Postgres. Unit testing on in-memory sqlite doesn't work with this
patch (there seems to be a problem with Alembic/in-memory-sqlite combination).

In case if MySQL and PostgreSQL with specifc user/password and database
are present, opportunistic tests will be started automatically. See
storyboard/tests/db/sqlalchemy/test_migrations.py for instructions.

OpenStack CI infrastructure provides these, so we get tests against
MySQL and Postgres with this commit.

Note(1): this patch doesn't modify database model. The main goal of this
patch is to enable continuous testing of DB migrations.

Note(2): most of the code is based on Nova. Which is good because
eventually it'll be extracted to Oslo library and we'll be able
to use Oslo instead of custom code.

Change-Id: Ia763124bea9ac8e39c6604f04fd99fa83645d5ba
2014-01-22 10:54:32 -08:00
Ruslan Kamaldinov
b0d72b74e5 Fixed doc build
Fixed doc build by aligning Sphinx version with global OS requirements.
Also added an entry for doc build to tox.ini.

Change-Id: Icf411219a73d4f50640e404d6db5019f5483e7f9
2014-01-17 10:02:03 +04:00
Monty Taylor
d6066f2a75 Add SQLalchemy database model
As a step towards continuous deployment and having a pecan/WSME REST
interface, split the database out into SQLalchemy-based model using
Alembic for migrations. To support that, also pull in oslo.db and use
oslo.config for config files.

Change-Id: I33a1e72700be14e28255aaa52faed70c4686a3ec
2014-01-13 18:52:47 +04:00
Monty Taylor
1c70add1bd Update setup code past d2to1
Change-Id: I54c63423a4b25857e518ab532378bf734abef1bb
2013-09-25 12:06:40 -04:00
Monty Taylor
d035720744 Added OpenStack dev things
Added a pbr-based build system and a tox file and some requirements
files. Also moved the apps to all be under storyboard so that a
publication to PyPI won't do evil things from an install perspective.
2013-07-15 13:35:32 -04:00