Fix the bug of pep8 and building api-guide
`sphinx-build` command is not found in test-env. To fix pep8, also blacklist the new bandit warning B105, this will be fixed in a followup. (cherry picked from commitbf95c37b84
) Change-Id: Ic1b8c3a4bfd67fff082297b881df66ffb9ca2c50 (cherry picked from commit367453b543
)
This commit is contained in:
parent
6479e02ce2
commit
9314499b2b
|
@ -234,7 +234,7 @@ class SimpleCryptoPlugin(c.CryptoPluginBase):
|
|||
length_factor = 2
|
||||
|
||||
if (algorithm.lower() in c.PluginSupportTypes.SYMMETRIC_ALGORITHMS
|
||||
and bit_length/length_factor
|
||||
and bit_length / length_factor
|
||||
in c.PluginSupportTypes.SYMMETRIC_KEY_LENGTHS):
|
||||
return True
|
||||
elif (algorithm.lower() in c.PluginSupportTypes.ASYMMETRIC_ALGORITHMS
|
||||
|
|
|
@ -127,7 +127,7 @@ class SecretStoresTestCase(base.TestCase):
|
|||
|
||||
stores = json_data['secret-stores']
|
||||
|
||||
store = stores[len(stores)-1]
|
||||
store = stores[len(stores) - 1]
|
||||
secret_store_ref = store['secret_store_ref']
|
||||
resp = self.ss_behaviors.set_preferred_secret_store(secret_store_ref,
|
||||
user_name=user)
|
||||
|
@ -193,7 +193,7 @@ class SecretStoresTestCase(base.TestCase):
|
|||
|
||||
stores = json_data['secret-stores']
|
||||
|
||||
store = stores[len(stores)-1]
|
||||
store = stores[len(stores) - 1]
|
||||
secret_store_ref = store['secret_store_ref']
|
||||
resp = self.ss_behaviors.set_preferred_secret_store(secret_store_ref,
|
||||
user_name=user)
|
||||
|
|
5
tox.ini
5
tox.ini
|
@ -49,7 +49,7 @@ commands =
|
|||
doc8 {posargs}
|
||||
flake8 {posargs}
|
||||
# Run security linter
|
||||
bandit -r barbican -x tests -n5
|
||||
bandit -r barbican -x tests -n5 -s B105
|
||||
|
||||
[testenv:genconfig]
|
||||
basepython = python3
|
||||
|
@ -89,6 +89,7 @@ whitelist_externals = rm
|
|||
basepython = python3
|
||||
# This environment is called from CI scripts to test and publish
|
||||
# the API Guide to developer.openstack.org.
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
commands =
|
||||
rm -rf api-guide/build
|
||||
sphinx-build -W -b html -d api-guide/build/doctrees api-guide/source api-guide/build/html
|
||||
|
@ -158,7 +159,7 @@ exclude = .git,.idea,.tox,bin,dist,debian,rpmbuild,tools,*.egg-info,*.eggs,contr
|
|||
[testenv:bandit]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = bandit -r barbican -x tests -n5
|
||||
commands = bandit -r barbican -x tests -n5 -s B105
|
||||
|
||||
[testenv:bindep]
|
||||
basepython = python3
|
||||
|
|
Loading…
Reference in New Issue