summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jjb/ci_gate_security/anteater-security-audit-weekly.sh2
-rw-r--r--jjb/fuel/fuel-daily-jobs.yml6
-rwxr-xr-xjjb/functest/set-functest-env.sh6
-rw-r--r--jjb/releng/automate.yml4
-rwxr-xr-xutils/fetch_os_creds.sh7
-rw-r--r--utils/test/testapi/htmlize/htmlize.py1
-rw-r--r--utils/test/testapi/opnfv_testapi/tests/unit/resources/test_pod.py1
-rw-r--r--utils/test/testapi/opnfv_testapi/tests/unit/resources/test_project.py1
-rw-r--r--utils/test/testapi/opnfv_testapi/tests/unit/resources/test_token.py1
-rw-r--r--utils/test/testapi/requirements.txt2
-rw-r--r--utils/test/testapi/setup.py6
-rw-r--r--utils/test/testapi/test-requirements.txt6
-rw-r--r--utils/test/testapi/tox.ini10
-rw-r--r--utils/test/testapi/update/templates/backup_mongodb.py1
-rw-r--r--utils/test/testapi/update/templates/update_mongodb.py1
15 files changed, 39 insertions, 16 deletions
diff --git a/jjb/ci_gate_security/anteater-security-audit-weekly.sh b/jjb/ci_gate_security/anteater-security-audit-weekly.sh
index 436a173bc..11909636a 100644
--- a/jjb/ci_gate_security/anteater-security-audit-weekly.sh
+++ b/jjb/ci_gate_security/anteater-security-audit-weekly.sh
@@ -15,7 +15,7 @@ source $WORKSPACE/opnfv-projects.sh
for project in "${PROJECT_LIST[@]}"
do
- cmd="anteater --project testproj --path /home/opnfv/anteater/allrepos/$project"
+ cmd="/home/opnfv/venv/bin/anteater --project testproj --path /home/opnfv/anteater/allrepos/$project"
echo "Executing command inside container"
echo "$cmd"
echo "--------------------------------------------------------"
diff --git a/jjb/fuel/fuel-daily-jobs.yml b/jjb/fuel/fuel-daily-jobs.yml
index 1778615c0..7a57cb554 100644
--- a/jjb/fuel/fuel-daily-jobs.yml
+++ b/jjb/fuel/fuel-daily-jobs.yml
@@ -568,11 +568,11 @@
- trigger:
name: 'fuel-os-odl_l2-nofeature-noha-virtual-daily-master-trigger'
triggers:
- - timed: '' # '35 15 * * *'
+ - timed: '35 15 * * *'
- trigger:
name: 'fuel-os-odl_l3-nofeature-noha-virtual-daily-master-trigger'
triggers:
- - timed: '' # '5 18 * * *'
+ - timed: '5 18 * * *'
- trigger:
name: 'fuel-os-onos-sfc-noha-virtual-daily-master-trigger'
triggers:
@@ -596,7 +596,7 @@
- trigger:
name: 'fuel-os-nosdn-ovs-noha-virtual-daily-master-trigger'
triggers:
- - timed: '' # '5 9 * * *'
+ - timed: '5 9 * * *'
- trigger:
name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-virtual-daily-master-trigger'
triggers:
diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh
index 5daefa2ce..f6071e37a 100755
--- a/jjb/functest/set-functest-env.sh
+++ b/jjb/functest/set-functest-env.sh
@@ -9,6 +9,10 @@ set +o pipefail
# Prepare OpenStack credentials volume
if [[ ${INSTALLER_TYPE} == 'joid' ]]; then
rc_file_vol="-v $LAB_CONFIG/admin-openrc:/home/opnfv/functest/conf/openstack.creds"
+elif [[ ${INSTALLER_TYPE} == 'compass' && ${BRANCH} == 'master' ]]; then
+ cacert_file_vol="-v ${HOME}/os_cacert:/home/opnfv/functest/conf/os_cacert"
+ echo "export OS_CACERT=/home/opnfv/functest/conf/os_cacert" >> ${HOME}/opnfv-openrc.sh
+ rc_file_vol="-v ${HOME}/opnfv-openrc.sh:/home/opnfv/functest/conf/openstack.creds"
else
rc_file_vol="-v ${HOME}/opnfv-openrc.sh:/home/opnfv/functest/conf/openstack.creds"
fi
@@ -55,7 +59,7 @@ if [[ ${INSTALLER_TYPE} == 'compass' && ${DEPLOY_SCENARIO} == *'os-nosdn-openo-h
fi
if [ "$BRANCH" != 'stable/danube' ]; then
- volumes="${images_vol} ${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}"
+ volumes="${images_vol} ${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol} ${cacert_file_vol}"
else
volumes="${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}"
fi
diff --git a/jjb/releng/automate.yml b/jjb/releng/automate.yml
index db672648a..4f6044bb5 100644
--- a/jjb/releng/automate.yml
+++ b/jjb/releng/automate.yml
@@ -84,7 +84,9 @@
- shell: |
cd ./utils/test/{module}/
tox
- cp *.xml $WORKSPACE
+ if [ -e *.xml ];then
+ cp *.xml $WORKSPACE
+ fi
publishers:
- publish-coverage
diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh
index 285f838db..8374edbbd 100755
--- a/utils/fetch_os_creds.sh
+++ b/utils/fetch_os_creds.sh
@@ -12,7 +12,7 @@ set -o nounset
set -o pipefail
usage() {
- echo "usage: $0 [-v] -d <destination> -i <installer_type> -a <installer_ip> [-s <ssh_key>]" >&2
+ echo "usage: $0 [-v] -d <destination> -i <installer_type> -a <installer_ip> [-o <os_cacert>] [-s <ssh_key>]" >&2
echo "[-v] Virtualized deployment" >&2
echo "[-s <ssh_key>] Path to ssh key. For MCP deployments only" >&2
}
@@ -54,12 +54,13 @@ swap_to_public() {
: ${DEPLOY_TYPE:=''}
#Get options
-while getopts ":d:i:a:h:s:v" optchar; do
+while getopts ":d:i:a:h:s:o:v" optchar; do
case "${optchar}" in
d) dest_path=${OPTARG} ;;
i) installer_type=${OPTARG} ;;
a) installer_ip=${OPTARG} ;;
s) ssh_key=${OPTARG} ;;
+ o) os_cacert=${OPTARG} ;;
v) DEPLOY_TYPE="virt" ;;
*) echo "Non-option argument: '-${OPTARG}'" >&2
usage
@@ -70,6 +71,7 @@ done
# set vars from env if not provided by user as options
dest_path=${dest_path:-$HOME/opnfv-openrc.sh}
+os_cacert=${os_cacert:-$HOME/os_cacert}
installer_type=${installer_type:-$INSTALLER_TYPE}
installer_ip=${installer_ip:-$INSTALLER_IP}
if [ "${installer_type}" == "fuel" ] && [ "${BRANCH}" == "master" ]; then
@@ -156,6 +158,7 @@ elif [ "$installer_type" == "compass" ]; then
if [ "${BRANCH}" == "master" ]; then
sudo docker cp compass-tasks:/opt/openrc $dest_path &> /dev/null
sudo chown $(whoami):$(whoami) $dest_path
+ sudo docker cp compass-tasks:/opt/os_cacert $os_cacert &> /dev/null
else
verify_connectivity $installer_ip
controller_ip=$(sshpass -p'root' ssh 2>/dev/null $ssh_options root@${installer_ip} \
diff --git a/utils/test/testapi/htmlize/htmlize.py b/utils/test/testapi/htmlize/htmlize.py
index 4576d9bb0..da6a6cf91 100644
--- a/utils/test/testapi/htmlize/htmlize.py
+++ b/utils/test/testapi/htmlize/htmlize.py
@@ -33,6 +33,7 @@ def main(args):
else:
exit(1)
+
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Create \
Swagger Spec documentation')
diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_pod.py b/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_pod.py
index 8e0ae407d..cb4f1d92c 100644
--- a/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_pod.py
+++ b/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_pod.py
@@ -85,5 +85,6 @@ class TestPodGet(TestPodBase):
else:
self.assert_get_body(pod, self.req_e)
+
if __name__ == '__main__':
unittest.main()
diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_project.py b/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_project.py
index 5a2ce7522..0622ba8d4 100644
--- a/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_project.py
+++ b/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_project.py
@@ -132,5 +132,6 @@ class TestProjectDelete(TestProjectBase):
code, body = self.get(self.req_d.name)
self.assertEqual(code, httplib.NOT_FOUND)
+
if __name__ == '__main__':
unittest.main()
diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_token.py b/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_token.py
index c9d4b72c4..b4ba88742 100644
--- a/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_token.py
+++ b/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_token.py
@@ -109,5 +109,6 @@ class TestTokenUpdateProject(TestToken):
def _update_success(self, request, body):
self.assertIn(request.name, body)
+
if __name__ == '__main__':
unittest.main()
diff --git a/utils/test/testapi/requirements.txt b/utils/test/testapi/requirements.txt
index 955ffc853..d2a45dcd0 100644
--- a/utils/test/testapi/requirements.txt
+++ b/utils/test/testapi/requirements.txt
@@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-pbr>=1.6
+pbr==2.0.0
setuptools>=16.0
tornado>=3.1,<=4.3
epydoc>=0.3.1
diff --git a/utils/test/testapi/setup.py b/utils/test/testapi/setup.py
index 15dda961f..f689cb30e 100644
--- a/utils/test/testapi/setup.py
+++ b/utils/test/testapi/setup.py
@@ -3,7 +3,11 @@ import setuptools
__author__ = 'serena'
+try:
+ import multiprocessing # noqa
+except ImportError:
+ pass
setuptools.setup(
- setup_requires=['pbr>=1.8'],
+ setup_requires=['pbr==2.0.0'],
pbr=True)
diff --git a/utils/test/testapi/test-requirements.txt b/utils/test/testapi/test-requirements.txt
index 645687b14..3bead7987 100644
--- a/utils/test/testapi/test-requirements.txt
+++ b/utils/test/testapi/test-requirements.txt
@@ -2,7 +2,9 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-mock
-pytest
coverage
+mock>=2.0
nose>=1.3.1
+pytest
+pytest-cov
+pytest-mock
diff --git a/utils/test/testapi/tox.ini b/utils/test/testapi/tox.ini
index 81c9dfab1..d300f1a61 100644
--- a/utils/test/testapi/tox.ini
+++ b/utils/test/testapi/tox.ini
@@ -4,7 +4,7 @@
# and then run "tox" from this directory.
[tox]
-envlist = py27,pep8
+envlist = pep8,py27
skipsdist = True
sitepackages = True
@@ -16,9 +16,11 @@ deps =
-rtest-requirements.txt
commands=
py.test \
- --basetemp={envtmpdir} \
- --cov \
- {posargs}
+ --basetemp={envtmpdir} \
+ --cov \
+ --cov-report term-missing \
+ --cov-report xml \
+ {posargs}
setenv=
HOME = {envtmpdir}
PYTHONPATH = {toxinidir}
diff --git a/utils/test/testapi/update/templates/backup_mongodb.py b/utils/test/testapi/update/templates/backup_mongodb.py
index 7e0dd5545..9c2437764 100644
--- a/utils/test/testapi/update/templates/backup_mongodb.py
+++ b/utils/test/testapi/update/templates/backup_mongodb.py
@@ -40,5 +40,6 @@ def backup(args):
cmd = ['mongodump', '-o', '%s' % out]
execute(cmd, args)
+
if __name__ == '__main__':
main(backup, parser)
diff --git a/utils/test/testapi/update/templates/update_mongodb.py b/utils/test/testapi/update/templates/update_mongodb.py
index ba4334aa3..f75959281 100644
--- a/utils/test/testapi/update/templates/update_mongodb.py
+++ b/utils/test/testapi/update/templates/update_mongodb.py
@@ -85,5 +85,6 @@ def update(args):
rename_fields(fields_old2New)
rename_collections(collections_old2New)
+
if __name__ == '__main__':
main(update, parser)