summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenStack Proposal Bot <openstack-infra@lists.openstack.org>2018-03-27 15:56:26 +0000
committerJesse Pretorius <jesse.pretorius@rackspace.co.uk>2018-03-27 19:07:43 +0100
commit1beb7061b0350d9b36852d92959ad5bb6e35c913 (patch)
treeea39f9ebf85abd139a13abe6740c5269f61ab581
parentf94c3f1946ac926cf77a8768e6b71450e14137f6 (diff)
Updated from OpenStack Ansible Tests
Also remove what appeared to be an unused file which caused the lint tests to fail. Change-Id: I5c70bff21b54f3fd5b2c1744e71f7bbfb3f23a52
Notes
Notes (review): Code-Review+2: Jesse Pretorius (odyssey4me) <jesse.pretorius@rackspace.co.uk> Code-Review+2: Jean-Philippe Evrard <jean-philippe@evrard.me> Workflow+1: Jean-Philippe Evrard <jean-philippe@evrard.me> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 27 Mar 2018 19:33:12 +0000 Reviewed-on: https://review.openstack.org/556938 Project: openstack/openstack-ansible-os_tacker Branch: refs/heads/master
-rw-r--r--.gitignore1
-rwxr-xr-xrun_tests.sh71
-rw-r--r--templates/tacker_horizon_dashboard_extension.py7
3 files changed, 53 insertions, 26 deletions
diff --git a/.gitignore b/.gitignore
index 5421f90..968d8b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -69,3 +69,4 @@ tests/*.retry
69 69
70# Git clones 70# Git clones
71openstack-ansible-ops 71openstack-ansible-ops
72previous
diff --git a/run_tests.sh b/run_tests.sh
index 4b72d3f..a31f946 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -12,8 +12,14 @@
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and 13# See the License for the specific language governing permissions and
14# limitations under the License. 14# limitations under the License.
15# 15
16# Note: 16# PURPOSE:
17# This script clones the openstack-ansible-tests repository to the
18# tests/common folder in order to be able to re-use test components
19# for role testing. This is intended to be the thinnest possible
20# shim for test execution outside of OpenStack CI.
21
22# WARNING:
17# This file is maintained in the openstack-ansible-tests repository. 23# This file is maintained in the openstack-ansible-tests repository.
18# https://git.openstack.org/cgit/openstack/openstack-ansible-tests/tree/run_tests.sh 24# https://git.openstack.org/cgit/openstack/openstack-ansible-tests/tree/run_tests.sh
19# If you need to modify this file, update the one in the openstack-ansible-tests 25# If you need to modify this file, update the one in the openstack-ansible-tests
@@ -26,33 +32,60 @@ set -xeu
26 32
27## Vars ---------------------------------------------------------------------- 33## Vars ----------------------------------------------------------------------
28 34
29export WORKING_DIR=${WORKING_DIR:-$(pwd)} 35WORKING_DIR="$(readlink -f $(dirname $0))"
36
37COMMON_TESTS_PATH="${WORKING_DIR}/tests/common"
38TESTING_HOME=${TESTING_HOME:-$HOME}
39ZUUL_TESTS_CLONE_LOCATION="/home/zuul/src/git.openstack.org/openstack/openstack-ansible-tests"
40
41# Use .gitreview as the key to determine the appropriate
42# branch to clone for tests.
43TESTING_BRANCH=$(awk -F'=' '/defaultbranch/ {print $2}' "${WORKING_DIR}/.gitreview")
44if [[ "${TESTING_BRANCH}" == "" ]]; then
45 TESTING_BRANCH="master"
46fi
30 47
31## Main ---------------------------------------------------------------------- 48## Main ----------------------------------------------------------------------
32 49
50# Source distribution information
33source /etc/os-release || source /usr/lib/os-release 51source /etc/os-release || source /usr/lib/os-release
34 52
35install_pkg_deps() { 53# Prefer dnf over yum for CentOS.
36 pkg_deps="git" 54which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum'
37 55
38 # Prefer dnf over yum for CentOS. 56# Figure out the appropriate package install command
39 which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum' 57case ${ID,,} in
58 *suse*) pkg_mgr_cmd="zypper -n in" ;;
59 centos|rhel|fedora) pkg_mgr_cmd="${RHT_PKG_MGR} install -y" ;;
60 ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;;
61 *) echo "unsupported distribution: ${ID,,}"; exit 1 ;;
62esac
40 63
41 case ${ID,,} in 64# Install git so that we can clone the tests repo
42 *suse*) pkg_mgr_cmd="zypper -n in" ;; 65eval sudo $pkg_mgr_cmd git
43 centos|rhel|fedora) pkg_mgr_cmd="${RHT_PKG_MGR} install -y" ;;
44 ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;;
45 *) echo "unsupported distribution: ${ID,,}"; exit 1 ;;
46 esac
47 66
48 eval sudo $pkg_mgr_cmd $pkg_deps 67# Clone the tests repo for access to the common test script
49} 68if [[ ! -d ${COMMON_TESTS_PATH} ]]; then
69 # The tests repo doesn't need a clone, we can just
70 # symlink it.
71 if [[ "$(basename ${WORKING_DIR})" == "openstack-ansible-tests" ]]; then
72 ln -s ${WORKING_DIR} ${COMMON_TESTS_PATH}
50 73
51# Install the host distro package dependencies 74 # In zuul v3 any dependent repository is placed into
52install_pkg_deps 75 # /home/zuul/src/git.openstack.org, so we check to see
76 # if there is a tests checkout there already. If so, we
77 # symlink that and use it.
78 elif [[ -d "${ZUUL_TESTS_CLONE_LOCATION}" ]]; then
79 ln -s "${ZUUL_TESTS_CLONE_LOCATION}" ${COMMON_TESTS_PATH}
53 80
54# Clone the tests repo for access to the common test script 81 # Otherwise we're clearly not in zuul or using a previously setup
55source tests/tests-repo-clone.sh 82 # repo in some way, so just clone it from upstream.
83 else
84 git clone -b ${TESTING_BRANCH} \
85 https://git.openstack.org/openstack/openstack-ansible-tests \
86 ${COMMON_TESTS_PATH}
87 fi
88fi
56 89
57# Execute the common test script 90# Execute the common test script
58source tests/common/run_tests_common.sh 91source tests/common/run_tests_common.sh
diff --git a/templates/tacker_horizon_dashboard_extension.py b/templates/tacker_horizon_dashboard_extension.py
deleted file mode 100644
index 82bf2ef..0000000
--- a/templates/tacker_horizon_dashboard_extension.py
+++ /dev/null
@@ -1,7 +0,0 @@
1DASHBOARD = 'nfv'
2DISABLED = {{ tacker_horizon_dashboard_disable }}
3ADD_INSTALLED_APPS = [
4 'tacker_horizon',
5 'tacker_horizon.openstack_dashboard.dashboards.nfv',
6]
7