deb-aodh/devstack/gate/gate_hook.sh
Chris Dent 0fe31249fe Add basic gate functional testing jobs for aodh
This provides a way to run functional tests from the gate, initially
just a simple set of gabbi tests which exercise the API. Once this
has proven to be working we can add more.

The model here is a hybrid of what was started for ceilometer and
what was used in gnocchi with some adjustments to allow for some
local testing.

The tests produced by test_gabbi_live will only run if
AODH_SERVICE_URL is set to the alarming endpoint. A keystone auth
token is needed in AODH_SERVICE_TOKEN. post_test_hook.sh
makes this happen if we are in a devstack-gate environment.
Otherwise they must be set by the caller.

The expectation is that we'll stick more test in tests/functional as
we have time, energy and brains.

Note that the layout of the functional tests assumes that the tests
will skip (or not even generate tests) if a functional environment
is not in place, such as when the unit tests are run.

Change-Id: Ia40e9c6b956209ecd0086ca861a90ce0c92b7b10
2015-07-24 16:38:43 +00:00

40 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# This script is executed inside gate_hook function in devstack gate.
# A space separated lists of storage backends.
STORAGE_DRIVERS="$1"
ENABLED_SERVICES="key,aodi-api,aodh-notifier,aodh-evaluator"
ENABLED_SERVICES+="ceilometer-acompute,ceilometer-acentral,ceilometer-anotification,"
ENABLED_SERVICES+="ceilometer-collector,ceilometer-api,"
export DEVSTACK_GATE_INSTALL_TESTONLY=1
export DEVSTACK_GATE_NO_SERVICES=1
export DEVSTACK_GATE_TEMPEST=0
export DEVSTACK_GATE_EXERCISES=0
export KEEP_LOCALRC=1
# default to mysql
case $STORAGE_DRIVER in
*postgresql*)
export DEVSTACK_GATE_POSTGRES=1
;;
esac
export ENABLED_SERVICES
$BASE/new/devstack-gate/devstack-vm-gate.sh