diff --git a/.zuul.yaml b/.zuul.yaml index 1a7f69c2..051cc90c 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -22,6 +22,8 @@ - openstack/ec2-api - openstack/neutron - openstack/swift3 + - openstack/neutron-tempest-plugin + - openstack/ec2api-tempest-plugin - job: name: ec2-api-rally-fakevirt diff --git a/ec2api/tests/contrib/post_test_hook.sh b/ec2api/tests/contrib/post_test_hook.sh deleted file mode 100755 index f0268577..00000000 --- a/ec2api/tests/contrib/post_test_hook.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -x -# -# 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. - -# Sleep some time until all services are starting -sleep 5 - -export EC2API_DIR=$(readlink -f .) -export TEST_CONFIG="functional_tests.conf" - -# bug somewhere -unset OS_AUTH_TYPE - -function die() { - echo "ERROR in $1: $2" - exit 1 -} -export -f die -function warn() { - echo "WARNING in $1: $2" -} -export -f warn - -if [[ ! -f $EC2API_DIR/$TEST_CONFIG ]]; then - openstack endpoint list --os-identity-api-version=3 - openstack service list --long - if [[ "$?" -ne "0" ]]; then - echo "Looks like credentials are absent." - exit 1 - fi - - STACK_USER=$(whoami) $EC2API_DIR/devstack/create_config $TEST_CONFIG - if [[ "$?" -ne "0" ]]; then - echo "Config creation has failed." - exit 1 - fi -fi - -echo "---------------------------------------------------------- Config -" -cat $EC2API_DIR/$TEST_CONFIG -echo "-------------------------------------------------------------------" - -sudo pip install virtualenv -sudo rm -rf .venv -sudo virtualenv .venv -sudo chown -R $USER .venv -source .venv/bin/activate -pip install -r test-requirements.txt -pip install git+https://github.com/openstack/tempest.git@master -sudo OS_STDOUT_CAPTURE=-1 OS_STDERR_CAPTURE=-1 OS_TEST_TIMEOUT=500 OS_TEST_LOCK_PATH=${TMPDIR:-'/tmp'} \ - python -m subunit.run discover -t ./ ./ec2api/tests/functional | subunit-2to1 | tools/colorizer.py -RETVAL=$? -deactivate - -# list resources to check what left after tests -EC2_URL=`openstack endpoint list --service ec2 --interface public --os-identity-api-version=3 -c URL -f value` -AWS_PARAMS="--region RegionOne --endpoint-url $EC2_URL" -echo "========================================================================================================" -echo "==================================================================================== Admin resources ===" -echo "========================================================================================================" -aws $AWS_PARAMS --profile admin ec2 describe-instances -aws $AWS_PARAMS --profile admin ec2 describe-images -aws $AWS_PARAMS --profile admin ec2 describe-volumes -aws $AWS_PARAMS --profile admin ec2 describe-snapshots - -echo "========================================================================================================" -echo "===================================================================================== User resources ===" -echo "========================================================================================================" -aws $AWS_PARAMS --profile user ec2 describe-instances -aws $AWS_PARAMS --profile user ec2 describe-images -aws $AWS_PARAMS --profile user ec2 describe-volumes -aws $AWS_PARAMS --profile user ec2 describe-snapshots - -openstack server list --all-projects -openstack image list -openstack volume list --all-projects -cinder snapshot-list --all-tenants - -exit $RETVAL diff --git a/playbooks/legacy/ec2-api-functional-neutron-full/run.yaml b/playbooks/legacy/ec2-api-functional-neutron-full/run.yaml index 039d9563..d6053f08 100644 --- a/playbooks/legacy/ec2-api-functional-neutron-full/run.yaml +++ b/playbooks/legacy/ec2-api-functional-neutron-full/run.yaml @@ -31,6 +31,8 @@ cat << 'EOF' >>"/tmp/dg-local.conf" [[local|localrc]] enable_plugin ec2-api git://git.openstack.org/openstack/ec2-api + enable_plugin neutron-tempest-plugin git://git.openstack.org/openstack/neutron-tempest-plugin + TEMPEST_PLUGINS='/opt/stack/new/ec2api-tempest-plugin' RUN_LONG_TESTS=1 EOF @@ -43,18 +45,16 @@ set -e set -x export PYTHONUNBUFFERED=true + export DEVSTACK_GATE_TEMPEST=1 + export TEMPEST_CONCURRENCY=2 export DEVSTACK_GATE_NEUTRON=1 export PROJECTS="openstack/ec2-api $PROJECTS" export PROJECTS="openstack/swift3 $PROJECTS" + export PROJECTS="openstack/neutron-tempest-plugin $PROJECTS" export ENABLED_SERVICES+=,swift3 - - function post_test_hook { - source $BASE/new/devstack/accrc/admin/admin - cd /opt/stack/new/ec2-api/ - ./ec2api/tests/contrib/post_test_hook.sh - } - export -f post_test_hook + export PROJECTS="openstack/ec2api-tempest-plugin $PROJECTS" + export DEVSTACK_GATE_TEMPEST_REGEX="ec2api_tempest_plugin" cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh