aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-07-16 13:19:55 +0000
committerGerrit Code Review <review@openstack.org>2017-07-16 13:19:55 +0000
commite4245aa41596e921a8d5ef2a8c173884d446bc8a (patch)
tree31b3d45a72ad6eec9765c868f0547efc2b94c4e8
parent6f74c6c484a90dcfd05a3eec6737408bd7e7b9af (diff)
parentcc7aabc12ef51809a115a5b27634affc4379b49a (diff)
downloadkolla-e4245aa41596e921a8d5ef2a8c173884d446bc8a.tar.gz
kolla-e4245aa41596e921a8d5ef2a8c173884d446bc8a.zip
Merge "Add bandit check to all python code"
-rw-r--r--.gitignore3
-rw-r--r--kolla/tests/test_build.py4
-rwxr-xr-xtools/version-check.py6
-rw-r--r--tox.ini2
4 files changed, 9 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 61cb32afd..b452ba48d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,6 +45,9 @@ releasenotes/build
# Files generated by Ansible
ansible/*.retry
+#OpenStack releases repo used by version_check.py.
+.releases
+
# Others
.DS_Store
.vimrc
diff --git a/kolla/tests/test_build.py b/kolla/tests/test_build.py
index b503222b4..40722b779 100644
--- a/kolla/tests/test_build.py
+++ b/kolla/tests/test_build.py
@@ -376,10 +376,10 @@ class KollaWorkerTest(base.TestCase):
@mock.patch('shutil.copytree')
def test_work_dir(self, copytree_mock):
- self.conf.set_override('work_dir', '/tmp/foo')
+ self.conf.set_override('work_dir', 'tmp/foo')
kolla = build.KollaWorker(self.conf)
kolla.setup_working_dir()
- self.assertEqual('/tmp/foo/docker', kolla.working_dir)
+ self.assertEqual('tmp/foo/docker', kolla.working_dir)
class MainTest(base.TestCase):
diff --git a/tools/version-check.py b/tools/version-check.py
index b73eb0900..abeacc8d9 100755
--- a/tools/version-check.py
+++ b/tools/version-check.py
@@ -16,7 +16,7 @@ import argparse
import logging
import os
import re
-import subprocess
+import subprocess # nosec
import sys
import yaml
@@ -38,7 +38,7 @@ logging.basicConfig(level=logging.INFO)
LOG = logging.getLogger(__name__)
RELEASE_REPO = 'https://github.com/openstack/releases'
-TARGET = '/tmp/releases'
+TARGET = '.releases'
SKIP_PROJECTS = {
'gnocchi-base': 'Gnocchi is not managed by openstack/releases project',
@@ -60,7 +60,7 @@ def update_releases_repo():
else:
cmd = ['git', '--git-dir', os.path.join(TARGET, '.git'), '--work-tree',
TARGET, 'pull']
- subprocess.call(cmd)
+ subprocess.call(cmd) # nosec
def get_default_branch():
diff --git a/tox.ini b/tox.ini
index 8ec8962d8..05af3d118 100644
--- a/tox.ini
+++ b/tox.ini
@@ -36,7 +36,7 @@ commands =
flake8 {posargs}
{toxinidir}/tools/validate-all-dockerfiles.sh
python {toxinidir}/tools/validate-all-file.py
- bandit docker kolla tests tools
+ bandit -r docker kolla tests tools
[testenv:bandit]
commands = bandit -r docker kolla tests tools