python-ironicclient/tools/run_functional.sh
Vladyslav Drok 40a87d534f Allow to use none auth in functional tests
This change will make possible adding a new functional job running
ironic in noauth mode, and accessing it with none auth plugin from
the tests. There was no decision if such job is needed, but still
seems to be a good thing to keep the code updated to correspond to
what is the intended way of working with noauth ironic.

Change-Id: I48cf37c87fdb74a3b38742a929698c9bd146d7d1
2018-05-18 08:57:22 +00:00

29 lines
616 B
Bash
Executable File

#!/bin/bash
FUNC_TEST_DIR=$(dirname $0)/../ironicclient/tests/functional/
CONFIG_FILE=$FUNC_TEST_DIR/test.conf
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
tox -e functional