Files
group-based-policy/gbpservice/tests/contrib/gate_hook.sh
Sumit Naiksatam c5dffd53a1 Adding devstack artifacts for integration gate job
This will allow using the upstream devstack branch.
The gbp-specific artifacts will be patched on top
of that branch.

Also checking to see if resources are not getting
cleaned up after the exercise script run.

Closes-bug: 1469545

Change-Id: I610774366cd72348dd756c91c9989add9288de15
2015-07-01 04:20:08 -07:00

42 lines
1.2 KiB
Bash

#!/bin/bash
CONTRIB_DIR="$BASE/new/group-based-policy/gbpservice/tests/contrib"
cp $CONTRIB_DIR/functions-gbp .
source functions-gbp
set -x
trap prepare_logs ERR
prepare_gbp_devstack
$TOP_DIR/stack.sh
# Add a rootwrap filter to support test-only
# configuration (e.g. a KillFilter for processes that
# use the python installed in a tox env).
FUNC_FILTER=$CONTRIB_DIR/filters.template
sed -e "s+\$BASE_PATH+$BASE/new/group-based-policy/.tox/dsvm-functional+" \
$FUNC_FILTER | sudo tee /etc/neutron/rootwrap.d/functional.filters > /dev/null
# Use devstack functions to install mysql and psql servers
source $TOP_DIR/lib/config
source $TOP_DIR/stackrc
source $TOP_DIR/lib/database
disable_service postgresql
enable_service mysql
initialize_database_backends
install_database
# Set up the 'openstack_citest' user and database in each backend
tmp_dir=`mktemp -d`
cat << EOF > $tmp_dir/mysql.sql
CREATE DATABASE openstack_citest;
CREATE USER 'openstack_citest'@'localhost' IDENTIFIED BY 'openstack_citest';
CREATE USER 'openstack_citest' IDENTIFIED BY 'openstack_citest';
GRANT ALL PRIVILEGES ON *.* TO 'openstack_citest'@'localhost';
GRANT ALL PRIVILEGES ON *.* TO 'openstack_citest';
FLUSH PRIVILEGES;
EOF
/usr/bin/mysql -u root < $tmp_dir/mysql.sql