From d42bb2da670022cfdfc00900f8da27421d26af67 Mon Sep 17 00:00:00 2001 From: Tin Lam Date: Sat, 7 Jan 2017 22:46:05 -0600 Subject: [PATCH] Updated docstring for test_sql_upgrade.py The docstring at [1] references usage of backend_sql.conf, which is no longer used by the tests. The tests are using oslo.db unit tests base. This patchset updates the docstring and places a reference to [2]. [1] https://github.com/openstack/keystone/blob/master/keystone/tests/unit/test_sql_upgrade.py#L14-L32 [2] http://docs.openstack.org/developer/oslo.db/contributing.html#how-to-run-unit-tests Change-Id: Ifc3cb8c2a57c83a44408be5771a88f141d6b31e5 Closes-Bug: #1654659 --- keystone/tests/unit/test_sql_upgrade.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/keystone/tests/unit/test_sql_upgrade.py b/keystone/tests/unit/test_sql_upgrade.py index 4be35b1b65..7bec3011d1 100644 --- a/keystone/tests/unit/test_sql_upgrade.py +++ b/keystone/tests/unit/test_sql_upgrade.py @@ -16,13 +16,20 @@ Test for SQL migration extensions. To run these tests against a live database: -1. Modify the file ``keystone/tests/unit/config_files/backend_sql.conf`` to use - the connection for your live database. -2. Set up a blank, live database +1. Set up a blank, live database. +2. Export database information to environment variable + ``OS_TEST_DBAPI_ADMIN_CONNECTION``. For example:: + + export OS_TEST_DBAPI_ADMIN_CONNECTION=postgresql://localhost/postgres?host= + /var/folders/7k/pwdhb_mj2cv4zyr0kyrlzjx40000gq/T/tmpMGqN8C&port=9824 + 3. Run the tests using:: tox -e py27 -- keystone.tests.unit.test_sql_upgrade +For further information, see `oslo.db documentation +`_. + WARNING:: Your database will be wiped.