tacker/tools/prepare_functional_test.sh
gong yong sheng b90d3e4d6d Add a shell script for developers to prepare functional test env
After devstack installation, to run functional test cases, the
nova instance quota, keypair and neutron port quota should be
set to a level which will not block tests. This patch adds a tool
to do this preparation so that developers can easily run
functional tests locally.

Change-Id: I1c2fae110863906e3f7601456dbf79ff06da4c40
Closes-bug: #1617303
2016-08-31 10:21:54 +08:00

19 lines
470 B
Bash
Executable File

# This script is used to prepare functional test env after devstack
# installation of tacker
DEVSTACK_DIR=${DEVSTACK_DIR:-~/devstack}
TACKER_DIR=$(dirname "$0")/..
PRIVATE_KEY_FILE=${PRIVATE_KEY_FILE:-/dev/null}
NFV_USER=${NFV_USER:-"nfv_user"}
# Test devstack dir setting
if [ ! -f ${DEVSTACK_DIR}/openrc ]; then
echo "Please set right DEVSTACK_DIR"
exit 1
fi
source ${TACKER_DIR}/tacker/tests/contrib/post_test_hook_lib.sh
fixup_quota
add_key_if_not_exist