trio2o/tricircle/tempestplugin/post_test_hook.sh
Chaoyi Huang 9cf49bbf65 Add tempest test cases which are needed for integration test in Tricircle
1.What is the purpose of this patch set?
The Tricircle project doesn't provide integration test yet. As
the OpenStack API gateway, the Tricircle should pass the test for
all OpenStack tempest test cases.

When a feature parity is implemented in the Tricircle, proper
test cases should be selected and executed in the Jenkins integration
job.

To simplify the test cases selection, all tempest test cases of
Nova/Cinder/Neutron/Scenario are listed in the files
of this patch, and give example in tempest_volume.sh on how to run
selected test cases.

The hook scripts for the Jenkins job has been provided in:
https://review.openstack.org/#/c/329300/

This patch is to update the hook scripts.

2. What is the benefit of this patch set for the Tricircle project?
Reuse OpenStack Nova/Cinder/Neutron tempest test cases, and provide
integration gate test for new patches.

3.What is the platform you tested it out?
After the Jenkins job patch is merged, the test will be executed in
the OpenStack CI pipeline, and as one of the gate test for a new
patch. CI pipeline will be triggered by gerrit review process, and
the test will be executed in the devstack VM(booted by CI pipeline).
http://docs.openstack.org/infra/system-config/jenkins.html

And the Jenkin job patch is being review in OpenStack infra
project-config:
https://review.openstack.org/#/c/329740/

Change-Id: Ic5ec358889265e1d54071cd0d20e2aaa081736d1
Signed-off-by: Chaoyi Huang <joehuang@huawei.com>
2016-06-28 13:17:42 +08:00

60 lines
1.8 KiB
Bash
Executable File

#!/bin/bash -xe
# 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 post_test_hook function in devstack gate.
export DEST=$BASE/new
export DEVSTACK_DIR=$DEST/tricircle/devstack
export TRICIRCLE_DIR=$DEST/tricircle
export TRICIRCLE_TEMPEST_PLUGIN_DIR=$TRICIRCLE_DIR/tricircle/tempestplugin
export TEMPEST_DIR=$DEST/tempest
# use admin role to create Tricircle top Pod and Pod1
source $DEVSTACK_DIR/admin-openrc.sh
token=$(openstack token issue | awk 'NR==5 {print $4}')
echo $token
curl -X POST http://127.0.0.1:19999/v1.0/pods \
-H "Content-Type: application/json" \
-H "X-Auth-Token: $token" -d '{"pod": {"pod_name": "RegionOne"}}'
curl -X POST http://127.0.0.1:19999/v1.0/pods \
-H "Content-Type: application/json" \
-H "X-Auth-Token: $token" \
-d '{"pod": {"pod_name": "Pod1", "az_name": "az1"}}'
# preparation for the tests
cd $TEMPEST_DIR
if [ -d .testrepository ]; then
sudo rm -r .testrepository
fi
testr init
# Run the Compute Tempest tests
# cd $TRICIRCLE_TEMPEST_PLUGIN_DIR
# sudo BASE=$BASE ./tempest_compute.sh
# Run the Volume Tempest tests
cd $TRICIRCLE_TEMPEST_PLUGIN_DIR
sudo BASE=$BASE ./tempest_volume.sh
# Run the Network Tempest tests
# cd $TRICIRCLE_TEMPEST_PLUGIN_DIR
# sudo BASE=$BASE ./tempest_network.sh
# Run the Scenario Tempest tests
# cd $TRICIRCLE_TEMPEST_PLUGIN_DIR
# sudo BASE=$BASE ./tempest_scenario.sh