Add bandit functional testing to tox and zuul

This change adds a testenv for running bandit's functional tests via tox
as well as running a check/gate job through zuul.

Change-Id: I1d3ec2dbf3a04c72dac49325afed9f855d5bb17a
Closes-Bug: #1765441
This commit is contained in:
Gage Hugo 2018-04-19 14:34:55 -05:00
parent 9d848dd79e
commit e691cb30b0
3 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,15 @@
- job:
name: bandit-functional
run: playbooks/bandit-functional/run.yaml
timeout: 600
# TODO(gagehugo): Make voting once tests pass
voting: false
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^tests/unit/.*$
- ^releasenotes/.*$
- job:
name: bandit-integration-barbican
parent: legacy-base
@ -146,6 +158,7 @@
- project:
check:
jobs:
- bandit-functional
- bandit-integration-barbican
- bandit-integration-glance
- bandit-integration-keystone
@ -163,6 +176,7 @@
- openstack-tox-lower-constraints
gate:
jobs:
- bandit-functional
- bandit-integration-barbican
- bandit-integration-glance
- bandit-integration-keystone

View File

@ -0,0 +1,8 @@
- hosts: all
tasks:
- name: Run bandit functional tests
shell: |
set -xe;
tox -e functional
args:
chdir: "{{ zuul.project.src_dir }}"

View File

@ -73,6 +73,13 @@ deps = -r{toxinidir}/doc/requirements.txt
commands=
python setup.py build_sphinx
[testenv:functional]
deps = -r{toxinidir}/test-requirements.txt
setenv = OS_TEST_PATH=./tests/functional
commands =
find bandit -type f -name "*.pyc" -delete
stestr run '{posargs}'
[flake8]
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.