With recent versions of oslo.config the tests have started to fail
because the multistring opt used for specifying input subunit file paths
was getting an implicit required. However it's not a required field just
positional. This commit fixes this issue by explicitly setting it to not
be requried and setting a default value of None for it. I'm not sure when
an implicit required was added in oslo.config, but this should fix it
regardless of which oslo.config version is used.
Fixing other gate failure also for pythin 2.7 & 3.8 compatibility.
- with mysql 8.0 there is no implicit user creation with GRANT. we
need to create user first.
- hacking version used is too old which pull old pyflakes (< 2.1.0) not
compatible with py3.8. Bumping hacking version to 2.0.0 which solve the
pyflakes version conflict with new pip resolver but skipping all the
new checks of 2.0.0. We can fix those later once gate is green.
- for openstack-tox-py27 we need to cap stestr with <3.0.0 so that it can pull
stestr py2 compatible version.
- move dec requirements seprate from test-requirements otherwise it conflist with
other deps.
Story: 2008348
Task: 41250
Change-Id: I219755d98d9f8b5a284c0e858b60f852b948c8d4
mysqladmin package is required in tools/test-setup.sh
so adding bindep.txt file for this binary dependencies. And postgresql
packages are also required as well.
- http://lists.openstack.org/pipermail/openstack-discuss/2019-June/007272.html
This commit also updated sphinx versions in test-requirements.txt to
avoid this error.
ERROR: Sphinx requires Python '>=3.5' but the running Python is 2.7.15
And also, this commit fixes a sqlalchemy error. This probably caused by
sqlalchemy version updates. It might be better to fix the code rather
than the sqlalchemy version cap.
sqlalchemy.exc.ArgumentError: Textual SQL expression
"tests.id='fake_null_test_..." should be explicitly declared as
text("tests.id='fake_null_test_...")
Change-Id: Iff79081403fbc26442165ff5feb300bc317b0dfc
The commands used by constraints need at least tox 2.0. Update to
reflect reality, which should help with local running of constraints
targets.
Change-Id: I9af1121a4a7b7f1db8bcae5a9f0f9a643e4b2428
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: Ifa267fcd8eb5334672dd0b603d42dedb67bd2c98
This updates the envlist to include modern versions of python. It
doesn't really mean anything except for you run tox without specifying
an environment it will now run py35 and py36 instead of py34 (which
isn't used anywhere anymore)
Change-Id: I5b61677d4ee7a2c5dbf29755c03243cba0e6446e
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. The best part is that
stestr supports using subunit2sql as a repository backend.
[1] https://github.com/mtreinish/stestr
Change-Id: I39f5db8f77de027c18917215c761dca69d8cbea0
This commit adds a command for deleting *.pyc before executing ostestr
with tox. This patch would help that removing unnecessary *.pyc files
when we rename, move or remove *.py ones.
Change-Id: I5fcce2e50cb7af9206175f340dad151e3eee6a9c
This commit adds support for using reno to generate the subunit2sql
release notes. This will make it much easier to keep up-to-date
and accurate release notes. Also doing it in tree will make the
notes reviewable which will help with that too.
Change-Id: I75502185a666945721dd84e4710e798962e612ee
In an effort to being really supporting using subunit2sql in a python3
environment this patch fixes all the issues with python3
incompatibility that show up when running tests. However, because the
test coverage is limited for certain parts there are still probably
pieces which don't work with python 3.
Change-Id: I160d1675069836fa514547c31866b22bcaf29dcb
This commit switches the test runner to be ostest in the tox.init.
This will ensure that the output formatting of subunit2sql is inline
with other projects.
Change-Id: I4fc0eeb6678c1fa6e2625bf8f81eef0faf77d3a7
The existing migration to add an avg run_time column to the tests table
neglected to calculate the run_time for existing rows and instead just
added a NULL value. Since this migration is part of a released version
of subunit2sql it's too late to add support for adding a run_time to
the columns where it makes sense. This commit adds a new migration
that will add the avg run_time for each test in the tests table where
there are successful test runs and the run_time is still set to NULL.
Additionally there were a couple of fixes around adding migrations
that needed to be added here, mostly just changing the base
alembic.ini to reflect the new relative path of the migration dir and
ignoring an additional pep8 rule which conflicted with the sqlalchemy
syntax.
Change-Id: I0b9c673106c41e9e66a2be5da6ebe9ca58d0ad36
This commit adds a sample config file for each of the current 3
commands in subunit2sql. The files contain the current list of options
which can potentially be set in a config file when using the command.
However for some of the arguments it doesn't make any sense to use them
outside of the cli.
The sample config files can be generated using the oslo-config-generator
utility with the config files added in the config-generator dir.
Change-Id: Ie578f99f27553e14fca4153a9ac5b5aa1c7eb49e
This commit updates the ignore list for the new hacking version. Some
additional rule skips are needed for various reasons.
Change-Id: I0f037978b76dec05cfd5eab6038252f6bc6c6db3
This commit adds the first unit tests to the projects. Right now
it's just testing a couple of utility methods. Mostly because they
were the easiest tests to write.