
python-tempestconf-tempest-packstack/devstack-demo zuul job uses generate-tempestconf-file role to generate tempest.conf. Since demo is a non-admin user with non-admin user we cannot use --create option but it was used since it is a bug, so we need to check for admin/demo user then enable the proper option. Used Jinja templates for creating tempest configuration script Create test-demo-user role which prepares resources for a demo user. Create generate-accounts-file role, which generates accounts.yaml file for Tempest needed for running tests as user who doesn't have persmissions to create resources. Change-Id: I727a6cfd154cb3f95c33da02440f25ae1765153f Story: #2001695 Co-Authored-By: Martin Kopec <mkopec@redhat.com>
23 lines
548 B
Django/Jinja
23 lines
548 B
Django/Jinja
# Script to generate tempest.conf
|
|
set -ex
|
|
export PATH=$PATH:/usr/local/sbin:/usr/sbin
|
|
source {{ virtualenvs.tempestconf }}/bin/activate
|
|
{{ source_credentials_commands }}
|
|
printenv
|
|
discover-tempest-config \
|
|
--debug \
|
|
-v \
|
|
{% if user == "admin" %}
|
|
--create \
|
|
{% else %}
|
|
--non-admin \
|
|
{% endif %}
|
|
{% if test_demo_user %}
|
|
--test-accounts {{ test_accounts_file }} \
|
|
{% endif %}
|
|
identity.uri $OS_AUTH_URL \
|
|
identity.admin_password $OS_PASSWORD \
|
|
service_available.swift False \
|
|
{{ aditional_tempestconf_params }} \
|
|
image.http_image {{ url_cirros_image }}
|