Adding hooks for devstack vm gate testing

Change-Id: Ic3bf5bb50cecd24150fa62df6400894bc47a8b31
This commit is contained in:
Steve Leon 2015-05-06 15:19:27 -07:00
parent 619f474230
commit 861c9604d4
4 changed files with 41 additions and 2 deletions

15
tests/gate_hook.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
set -ex
pushd $BASE/new/devstack
export ENABLED_SERVICES=cue,cue-api,cue-worker,zookeeper,dib,n-novnc
echo "DEST=/opt/stack/new" >> $BASE/new/devstack/localrc
echo "CUE_MANAGEMENT_KEY=cue-mgmt-key" >> $BASE/new/devstack/localrc
popd
# Run DevStack Gate
$BASE/new/devstack-gate/devstack-vm-gate.sh

View File

@ -24,8 +24,9 @@ fi
echo "Successfully contacted the Cue API"
# Where Cue and Tempest code lives
CUE_DIR=${CUE_DIR:-/opt/stack/cue}
TEMPEST_DIR=${TEMPEST_DIR:-/opt/stack/tempest}
DEFAULT_BASE=$(readlink -e $(dirname $(readlink -f $0))/../../..)
CUE_DIR=${CUE_DIR:-$DEFAULT_BASE/cue}
TEMPEST_DIR=${TEMPEST_DIR:-$DEFAULT_BASE/tempest}
# Install tempest
pip freeze | grep tempest 2>&1 1>/dev/null || pip install -e $TEMPEST_DIR

8
tests/post_test_hook.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
set -ex
cd /opt/stack/new/cue/tests/integration
# Run the Cue Tempest tests
sudo ./run_tests.sh

15
tests/pre_test_hook.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
set -ex
# Install cue devstack integration
pushd $BASE/new/cue/contrib/devstack
for f in lib/* extras.d/*; do
if [ ! -e "$BASE/new/devstack/$f" ]; then
echo "Installing: $f"
cp -r $f $BASE/new/devstack/$f
fi
done
popd