Move Redis code into fakeldap, since it's the only thing that still uses it.

Adjust auth unittests to skip fakeldap tests if Redis isn't around.
Adjust auth unittests to actually run the fakeldap tests if Redis /is/ around.
This commit is contained in:
Soren Hansen
2010-10-14 15:07:37 +02:00
parent 21a43083ef
commit 2e093e04ee
5 changed files with 45 additions and 68 deletions

View File

@@ -45,7 +45,6 @@ import sys
from twisted.scripts import trial as trial_script
from nova import datastore
from nova import flags
from nova import twistd
@@ -86,12 +85,6 @@ if __name__ == '__main__':
# TODO(termie): these should make a call instead of doing work on import
if FLAGS.fake_tests:
from nova.tests.fake_flags import *
# use db 8 for fake tests
FLAGS.redis_db = 8
if FLAGS.flush_db:
logging.info("Flushing redis datastore")
r = datastore.Redis.instance()
r.flushdb()
else:
from nova.tests.real_flags import *