Tests Fail

Bug #843082 reported by klmitch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
High
Unassigned

Bug Description

The run_tests.py file assumes databases are in the same file as the test directory. But Keystone creates the databases in the current directory.

So running <pre>python keystone/test/run_tests.py</pre> from the root keystone folder fails the SECOND time around since the databases are already there. This may be causing the CI environment to fail also.

Tags: bug
Revision history for this message
klmitch (q-noreply) wrote :

This is now succeeding, however the underlying problem remains: run_tests.py attempts to delete existing databases in the keystone/test directory, while the default keystone.conf writes databases to the current working directory.

This means that after tests have been run once from the top src directory, databases will be written to the top src directory, and never deleted by the test script.

The caveat to changing run_tests.py to delete databases from the cwd is that if run_tests.py is executed in production for whatever reason, production data could be lost (assuming a default keystone.conf).

I believe the best solution is to have (one or more) keystone.conf designed for exclusive use by run_tests.py (see issue #115: https://github.com/rackspace/keystone/issues/115 ), which put databases in a different location, say, /tmp/. Or even better, keep it in memory (see issue #112: https://github.com/rackspace/keystone/issues/112 ).

Revision history for this message
klmitch (q-noreply) wrote :

Sounds good - your solution works for me...

On 7/26/11 1:06 PM, "dolph"
<email address hidden>
 wrote:

>This is now succeeding, however the underlying problem remains:
>run_tests.py attempts to delete existing databases in the keystone/test
>directory, while the default keystone.conf writes databases to the
>current working directory.
>
>This means that after tests have been run once from the top src
>directory, databases will be written to the top src directory, and never
>deleted by the test script.
>
>The caveat to changing run_tests.py to delete databases from the cwd is
>that if run_tests.py is executed in production for whatever reason,
>production data could be lost (assuming a default keystone.conf).
>
>I believe the best solution is to have (one or more) keystone.conf
>designed for exclusive use by run_tests.py (see issue #115:
>https://github.com/rackspace/keystone/issues/115 ), which put databases
>in a different location, say, /tmp/. Or even better, keep it in memory
>(see issue #112: https://github.com/rackspace/keystone/issues/112 ).
>
>--
>Reply to this email directly or view it on GitHub:
>https://github.com/rackspace/keystone/issues/122#issuecomment-1656526

This email may include confidential information. If you received it in error, please delete it.

Revision history for this message
klmitch (q-noreply) wrote :

This is fixed with the introduction of the openstack standard ./run_tests.sh

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.