/usr/share/tripleo-image-elements/tempest/bin/run-tempest is in python-tripleo-image-elements 0.7.1-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | #!/usr/bin/env bash
#
# Copyright 2013 Red Hat
# All Rights Reserved.
#
# 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.
set -eux
set -o pipefail
cd /opt/stack/tempest
# Tempest needs 2 users, we add them here so that we know their passwords
keystone tenant-get demo_t1 || keystone tenant-create --name demo_t1
keystone user-get demo_t1 || keystone user-create --name demo_t1 --tenant demo_t1 --pass secret
keystone tenant-get demo_t2 || keystone tenant-create --name demo_t2
keystone user-get demo_t2 || keystone user-create --name demo_t2 --tenant demo_t2 --pass secret
# the orchestration tests need this
keystone user-role-add --user admin --role admin --tenant demo_t1 || true
# Users need either this or the admin role to use swift
keystone user-role-add --user demo_t1 --role swiftoperator --tenant demo_t1 || true
keystone user-role-add --user demo_t2 --role swiftoperator --tenant demo_t2 || true
# We require that a image is present with a name of user
USER_IMAGE_ID=$(nova image-show user | grep id | awk '$2=="id" {print $4}')
# And then copy it for tempest test that require a second image
if ! nova image-show user-copy 2> /dev/null ; then
glance image-download user | glance image-create --name user-copy --disk-format qcow2 --container-format bare --is-public 1
fi
USER_IMAGE_ID2=$(nova image-show user-copy | grep id | awk '$2=="id" {print $4}')
EXTNET=$(neutron net-show ext-net | awk '/ id / {print $4}')
# tempest requires two distinct flavors to use, but using m1.small would
# increase the amount of memory needed on the compute node. Instead we create
# an alternative m1.tiny, this will allow tests with only 4G of memory on
# compute nodes.
nova flavor-create m1.tiny_alt 99 512 2 1 || true
LOCK_PATH=`mktemp -d`
trap "rm -rf $LOCK_PATH" EXIT
# Calculate the keystone v3 from the v2 one
# Assuming the AUTH_URL is http://ip:port/version
OS_V3_AUTH_URL=${OS_AUTH_URL%/*}/v3
# TODO : see what other defaults can be used
# cp the tempest config file and edit the settings
cp etc/tempest.conf.sample etc/tempest.conf
cat - <<EOF | augtool --noautoload
set /augeas/load/PythonPaste/lens "PythonPaste.lns"
set /augeas/load/PythonPaste/incl "/opt/stack/tempest/etc/tempest.conf"
load
set /files/opt/stack/tempest/etc/tempest.conf/DEFAULT/lock_path $LOCK_PATH
set /files/opt/stack/tempest/etc/tempest.conf/DEFAULT/debug true
set /files/opt/stack/tempest/etc/tempest.conf/DEFAULT/use_stderr false
set /files/opt/stack/tempest/etc/tempest.conf/DEFAULT/log_file tempest.log
set /files/opt/stack/tempest/etc/tempest.conf/identity/uri $OS_AUTH_URL
set /files/opt/stack/tempest/etc/tempest.conf/identity/uri_v3 $OS_V3_AUTH_URL
set /files/opt/stack/tempest/etc/tempest.conf/identity/region regionOne
set /files/opt/stack/tempest/etc/tempest.conf/identity/admin_username $OS_USERNAME
set /files/opt/stack/tempest/etc/tempest.conf/identity/admin_tenant_name $OS_TENANT_NAME
set /files/opt/stack/tempest/etc/tempest.conf/identity/admin_password $OS_PASSWORD
set /files/opt/stack/tempest/etc/tempest.conf/identity/username demo_t1
set /files/opt/stack/tempest/etc/tempest.conf/identity/tenant_name demo_t1
set /files/opt/stack/tempest/etc/tempest.conf/identity/password secret
set /files/opt/stack/tempest/etc/tempest.conf/identity/alt_username demo_t2
set /files/opt/stack/tempest/etc/tempest.conf/identity/alt_password secret
set /files/opt/stack/tempest/etc/tempest.conf/identity/alt_tenant_name demo_t2
set /files/opt/stack/tempest/etc/tempest.conf/compute/image_ref $USER_IMAGE_ID
set /files/opt/stack/tempest/etc/tempest.conf/compute/image_ref_alt $USER_IMAGE_ID2
set /files/opt/stack/tempest/etc/tempest.conf/compute/flavor_ref_alt 99
set /files/opt/stack/tempest/etc/tempest.conf/compute/allow_tenant_isolation false
set /files/opt/stack/tempest/etc/tempest.conf/compute/fixed_network_name default-net
set /files/opt/stack/tempest/etc/tempest.conf/compute/network_for_ssh $EXTNET
set /files/opt/stack/tempest/etc/tempest.conf/compute-admin/password $OS_PASSWORD
set /files/opt/stack/tempest/etc/tempest.conf/compute-feature-enabled/resize false
set /files/opt/stack/tempest/etc/tempest.conf/network/public_network_id $EXTNET
set /files/opt/stack/tempest/etc/tempest.conf/service_available/cinder false
set /files/opt/stack/tempest/etc/tempest.conf/service_available/heat true
set /files/opt/stack/tempest/etc/tempest.conf/service_available/neutron true
set /files/opt/stack/tempest/etc/tempest.conf/service_available/ceilometer false
set /files/opt/stack/tempest/etc/tempest.conf/service_available/horizon false
set /files/opt/stack/tempest/etc/tempest.conf/stress/max_instances 4
set /files/opt/stack/tempest/etc/tempest.conf/stress/default_thread_number_per_action 2
set /files/opt/stack/tempest/etc/tempest.conf/network/tenant_network_cidr 172.16.0.0/16
save
EOF
testr run --parallel $(python tests2skip.py tests2skip.txt)
|