diff --git a/contrib/ci/multi_backend/post_test_hook.sh b/contrib/ci/multi_backend/post_test_hook.sh index 98f768644e..9efc7c419c 100755 --- a/contrib/ci/multi_backend/post_test_hook.sh +++ b/contrib/ci/multi_backend/post_test_hook.sh @@ -14,4 +14,4 @@ # This script is executed inside post_test_hook function in devstack gate. -source $BASE/new/manila/contrib/ci/post_test_hook.sh 1 +source $BASE/new/manila/contrib/ci/post_test_hook.sh $1 diff --git a/contrib/ci/post_test_hook.sh b/contrib/ci/post_test_hook.sh index 0d93ac03c4..dff9fb2942 100755 --- a/contrib/ci/post_test_hook.sh +++ b/contrib/ci/post_test_hook.sh @@ -18,18 +18,20 @@ sudo chown -R jenkins:stack $BASE/new/tempest sudo chown -R jenkins:stack $BASE/data/tempest sudo chmod -R o+rx $BASE/new/devstack/files -if [[ "$1" == "1" ]]; then - # if arg $1 is equal to "1", we assume multibackend installation +if [[ "$1" =~ "multibackend" ]]; then + # if arg $1 has "multibackend", then we assume multibackend installation source $BASE/new/devstack/functions iniset $BASE/new/tempest/etc/tempest.conf share multi_backend True - iniset $BASE/new/tempest/etc/tempest.conf share backend_names "$MANILA_SHARE_BACKEND1_NAME,$MANILA_SHARE_BACKEND2_NAME" + + # backend names are defined in pre_test_hook + iniset $BASE/new/tempest/etc/tempest.conf share backend_names "LONDON,PARIS" fi # let us control if we die or not set +o errexit cd $BASE/new/tempest -export TEMPEST_CONCURRENCY=2 +export TEMPEST_CONCURRENCY=8 export MANILA_TESTS='tempest.cli.*manila*' if [[ ! "$ZUUL_PROJECT" =~ python-manilaclient ]]; then MANILA_TESTS+=' tempest.api.share*'; diff --git a/contrib/ci/pre_test_hook.sh b/contrib/ci/pre_test_hook.sh index a29c519aef..28c0cdae0e 100755 --- a/contrib/ci/pre_test_hook.sh +++ b/contrib/ci/pre_test_hook.sh @@ -16,5 +16,25 @@ # Install manila devstack integration cp -r $BASE/new/manila/contrib/devstack/* $BASE/new/devstack + +localrc_path=$BASE/new/devstack/localrc +echo "DEVSTACK_GATE_TEMPEST_ALLOW_TENANT_ISOLATION=1" >> $localrc_path +echo "API_RATE_LIMIT=False" >> $localrc_path +echo "TEMPEST_SERVICES+=,manila" >> $localrc_path +echo "VOLUME_BACKING_FILE_SIZE=22G" >> $localrc_path + +echo "MANILA_BACKEND1_CONFIG_GROUP_NAME=london" >> $localrc_path +echo "MANILA_BACKEND2_CONFIG_GROUP_NAME=paris" >> $localrc_path +echo "MANILA_SHARE_BACKEND1_NAME=LONDON" >> $localrc_path +echo "MANILA_SHARE_BACKEND2_NAME=PARIS" >> $localrc_path + +# JOB_NAME is defined in openstack-infra/config project +# used by CI/CD, where this script is intended to be used. +if [[ "$JOB_NAME" =~ "multibackend" ]]; then + echo "MANILA_MULTI_BACKEND=True" >> $localrc_path +else + echo "MANILA_MULTI_BACKEND=False" >> $localrc_path +fi + # Install manila tempest integration cp -r $BASE/new/manila/contrib/tempest/tempest/* $BASE/new/tempest/tempest