f51566545e
OpenStack is dropping the py2.7 support in ussuri cycle. python-ironicclient is ready with python 3 and ok to drop the python 2.7 support. Complete discussion & schedule can be found in - http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html - https://etherpad.openstack.org/p/drop-python2-support Ussuri Communtiy-wide goal - https://review.opendev.org/#/c/691178/ Change-Id: Iacc50fde00f0d24e9c6ee2b1ac61b8fa060094fb
51 lines
1.6 KiB
YAML
51 lines
1.6 KiB
YAML
- hosts: all
|
|
tasks:
|
|
- shell:
|
|
cmd: |
|
|
set -e
|
|
set -x
|
|
export BASE='/opt/stack'
|
|
export IRONICCLIENT_DIR="$BASE/python-ironicclient"
|
|
sudo chmod -R a+rw /opt/stack/
|
|
cd $IRONICCLIENT_DIR
|
|
set +e
|
|
echo "Running ironicclient functional test suite"
|
|
|
|
# Only admin credentials needed for ironic api
|
|
source $BASE/devstack/openrc admin admin
|
|
|
|
FUNC_TEST_DIR=$IRONICCLIENT_DIR/ironicclient/tests/functional
|
|
CONFIG_FILE=$IRONICCLIENT_DIR/test.conf
|
|
echo 'Generating configuration file for functional tests'
|
|
|
|
if [[ -n "$IRONIC_URL" ]]; then
|
|
cat <<END >$CONFIG_FILE
|
|
[functional]
|
|
api_version = 1
|
|
auth_strategy=noauth
|
|
ironic_url=$IRONIC_URL
|
|
END
|
|
else
|
|
cat <<END >$CONFIG_FILE
|
|
[functional]
|
|
api_version = 1
|
|
os_auth_url=$OS_AUTH_URL
|
|
os_identity_api_version=$OS_IDENTITY_API_VERSION
|
|
os_username=$OS_USERNAME
|
|
os_password=$OS_PASSWORD
|
|
os_project_name=$OS_PROJECT_NAME
|
|
os_user_domain_id=$OS_USER_DOMAIN_ID
|
|
os_project_domain_id=$OS_PROJECT_DOMAIN_ID
|
|
os_service_type=baremetal
|
|
os_endpoint_type=public
|
|
END
|
|
fi
|
|
echo 'Configuration file is in '$CONFIG_FILE''
|
|
export IRONICCLIENT_TEST_CONFIG=$CONFIG_FILE
|
|
|
|
cd $IRONICCLIENT_DIR
|
|
echo 'Running Functional Tests under Python3'
|
|
tox -e functionalpy3
|
|
executable: /bin/bash
|
|
chdir: '/opt/stack/python-ironicclient'
|