Fix compatibility with latest oslo.config

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 1.1.0 (not latest which needs
lot of updates in code) so that it allow to pull the 2.1.1 pyflakes.

- 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
This commit is contained in:
Matthew Treinish 2020-11-30 17:14:13 -05:00 committed by Ghanshyam Mann
parent 99f83fda87
commit 6163992b3d
5 changed files with 20 additions and 10 deletions

4
doc/requirements.txt Normal file
View File

@ -0,0 +1,4 @@
openstackdocstheme>=1.11.0 # Apache-2.0
reno>=0.1.1 # Apache2
sphinx!=1.6.6,!=1.6.7,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,!=2.1.0;python_version>='3.4' # BSD

View File

@ -31,7 +31,8 @@ CONF = cfg.CONF
CONF.import_opt('verbose', 'subunit2sql.db.api')
SHELL_OPTS = [
cfg.MultiStrOpt('subunit_files', positional=True,
cfg.MultiStrOpt('subunit_files', positional=True, required=False,
default=None,
help='list of subunit files to put into the database'),
cfg.DictOpt('run_meta', short='r', default=None,
help='Dict of metadata about the run(s)'),

View File

@ -1,18 +1,19 @@
hacking>=0.12.0,!=0.13.0,<0.14
hacking>=1.1.0,<2.0.0
# remove this pyflakes and flake8 from this file once you bump the
# hacking to 3.2.0 or above. hacking 3.2.0 takes care of pyflakes
# and flake8 version compatibilty.
pyflakes>=2.1.1
flake8>=3.6.0
coverage>=3.6
fixtures>=0.3.14
mock>=1.0
sphinx!=1.6.6,!=1.6.7,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,!=2.1.0;python_version>='3.4' # BSD
testscenarios>=0.4
stestr>=1.0.0
stestr<3.0.0;python_version=='2.7' # BSD
stestr>=1.0.0;python_version>='3.4' # BSD
testtools>=0.9.34
PyMySql
psycopg2
oslo.concurrency>=3.5.0
# releasenotes
reno>=0.1.1 # Apache2
openstackdocstheme>=1.11.0 # Apache-2.0
# This is needed for oslo.db test code to be imported, it's not
# directly installed by oslo.db
testresources>=0.2.4 # Apache-2.0/BSD

View File

@ -23,8 +23,8 @@ sudo -H mysqladmin -u root password $DB_ROOT_PW
sudo -H mysql -u root -p$DB_ROOT_PW -h localhost -e "
DELETE FROM mysql.user WHERE User='';
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.*
TO '$DB_USER'@'%' identified by '$DB_PW' WITH GRANT OPTION;"
CREATE USER '$DB_USER'@'%' IDENTIFIED BY '$DB_PW';
GRANT ALL PRIVILEGES ON *.* TO '$DB_USER'@'%' WITH GRANT OPTION;"
# Now create our database.
mysql -u $DB_USER -p$DB_PW -h 127.0.0.1 -e "

View File

@ -41,6 +41,8 @@ commands = {posargs}
[testenv:docs]
basepython = python3
deps =
-r{toxinidir}/doc/requirements.txt
commands = python setup.py build_sphinx
@ -62,6 +64,8 @@ commands =
[testenv:releasenotes]
basepython = python3
deps =
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:bindep]