Keystone gate jobs unit tests live backends
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Core Infrastructure |
Triaged
|
Medium
|
Unassigned |
Bug Description
Keystone has a body of unit tests that are part of the gate. However, there are run against the SQLite database, which means that many constraints go unchecked. In production, people run with MySQL, Postgresql, and various LDAP servers for the backend instead.
To run the tests tests, we would need a Database or OpenLDAP server set up the way that Devstack does.
For ldap, we need to then do the equivalent of ./run_test.sh _ldap_tls_livetest
For MySQL and Postgresql, we need to modify the file tests/backend_
./run_test.sh backend_sql (there might be others we want to add in the future, but this is a start)
These test will run much more slowly than the sql tests. Additionally, I think the mysql tests are broken of now, and should be only run in non-voting mode.
Persistent resources like this can be somewhat problematic for unit test slaves, especially since they need to be preconfigured to allow the unpriviliged test user to interact with them (and at the same time prevent that user from being able to easily break them so that the next test run won't encounter false negatives due to previous tests breaking those resources). Also, if at all possible this needs to be designed in such a way that tests run in parallel won't step on each others' toes when possibly trying to interact with this shared resource simultaneously.
This is a much easier proposition if the tests are implemented in Tempest, since they'd have free run of the system to configure these services in whatever way they need (we just throw the server away after the job completes).