Move 'tests' directory into 'keystone' package

Similar to a range of other components (e.g. glance,nova,...) and recent
reviews by Monty.

Running individual tests can be done like this:

./run_tests.sh keystone.tests.test_drivers

Change-Id: I2482a48322150e5eb09b703326a94d8283f1c75b
This commit is contained in:
Sascha Peilicke
2013-01-21 15:34:42 +01:00
committed by Monty Taylor
parent 361f6fe111
commit 14e090154c
82 changed files with 54 additions and 59 deletions
+1 -1
View File
@@ -24,6 +24,6 @@ build/
dist/
etc/keystone.conf
etc/logging.conf
tests/tmp/
keystone/tests/tmp/
.project
.pydevproject
+1 -1
View File
@@ -16,7 +16,7 @@ include etc/*
include httpd/*
graft bin
graft doc
graft tests
graft keystone/tests
graft tools
graft examples
recursive-include keystone *.json *.xml *.cfg *.pem README *.po *.pot *.sql
+4 -4
View File
@@ -133,8 +133,8 @@ Test Structure
--------------
``./run_test.sh`` uses its python cohort (``run_tests.py``) to iterate
through the ``tests`` directory, using Nosetest to collect the tests and
invoke them using an OpenStack custom test running that displays the tests
through the ``keystone/tests`` directory, using Nosetest to collect the tests
and invoke them using an OpenStack custom test running that displays the tests
as well as the time taken to run those tests.
Not all of the tests in the tests directory are strictly unit tests. Keystone
@@ -223,9 +223,9 @@ and set environment variables ``KEYSTONE_IDENTITY_BACKEND=ldap`` and
``KEYSTONE_CLEAR_LDAP=yes`` in your ``localrc`` file.
The unit tests can be run against a live server with
``tests/_ldap_livetest.py``. The default password is ``test`` but if you have
``keystone/tests/_ldap_livetest.py``. The default password is ``test`` but if you have
installed devstack with a different LDAP password, modify the file
``tests/backend_liveldap.conf`` to reflect your password.
``keystone/tests/backend_liveldap.conf`` to reflect your password.
Building the Documentation
@@ -22,7 +22,7 @@ from keystone.common import ldap as ldap_common
from keystone import config
from keystone import exception
from keystone.identity.backends import ldap as identity_ldap
from keystone import test
from keystone.tests import core as test
import test_backend_ldap
@@ -21,7 +21,7 @@ import ldap.modlist
from keystone import config
from keystone import exception
from keystone import identity
from keystone import test
from keystone.tests import core as test
import _ldap_livetest
@@ -34,3 +34,4 @@ driver = keystone.policy.backends.sql.Policy
[trust]
driver = keystone.trust.backends.sql.Trust
+2 -2
View File
@@ -57,9 +57,9 @@ from keystone import trust
LOG = logging.getLogger(__name__)
ROOTDIR = os.path.dirname(os.path.abspath(os.curdir))
ROOTDIR = os.path.dirname(os.path.abspath('..'))
VENDOR = os.path.join(ROOTDIR, 'vendor')
TESTSDIR = os.path.join(ROOTDIR, 'tests')
TESTSDIR = os.path.join(ROOTDIR, 'keystone', 'tests')
ETCDIR = os.path.join(ROOTDIR, 'etc')
TMPDIR = os.path.join(TESTSDIR, 'tmp')
@@ -16,7 +16,7 @@ import copy
import datetime
import uuid
from keystone import test
from keystone.tests import core as test
from keystone import auth
from keystone import config
@@ -16,7 +16,7 @@
import uuid
from keystone import test
from keystone.tests import core as test
from keystone import auth
from keystone import exception
@@ -17,7 +17,7 @@
import datetime
import uuid
from keystone import test
from keystone.tests import core as test
from keystone.catalog import core
from keystone import config
@@ -15,10 +15,9 @@
# under the License.
import uuid
from keystone import test
from keystone import exception
from keystone import identity
from keystone.tests import core as test
import default_fixtures
import test_backend
@@ -23,7 +23,7 @@ from keystone.common import sql
from keystone import config
from keystone import exception
from keystone import identity
from keystone import test
from keystone.tests import core as test
import default_fixtures
import test_backend
@@ -20,7 +20,7 @@ import uuid
import memcache
from keystone import test
from keystone.tests import core as test
from keystone.common import utils
from keystone import exception
@@ -16,7 +16,7 @@
import uuid
from keystone import test
from keystone.tests import core as test
from keystone import config
from keystone.identity.backends import pam as identity_pam
@@ -18,11 +18,10 @@ import uuid
import sqlalchemy
from keystone import test
from keystone.common import sql
from keystone import config
from keystone import exception
from keystone.tests import core as test
import default_fixtures
import test_backend
@@ -16,7 +16,7 @@
import os
from keystone import test
from keystone.tests import core as test
from keystone import exception
@@ -18,7 +18,7 @@
import os
import shutil
from keystone import test
from keystone.tests import core as test
from keystone.common import openssl
from keystone import exception
@@ -1,4 +1,4 @@
from keystone import test
from keystone.tests import core as test
from keystone import config
from keystone import exception
@@ -20,7 +20,7 @@ import uuid
from lxml import etree
import webtest
from keystone import test
from keystone.tests import core as test
from keystone.common import extension
from keystone.common import serializer
@@ -16,7 +16,7 @@
import uuid
from keystone import test
from keystone.tests import core as test
from keystone.contrib import ec2
from keystone.contrib import s3
@@ -17,7 +17,7 @@
from keystone.contrib import stats
from keystone import config
from keystone import test
from keystone.tests import core as test
CONF = config.CONF
@@ -16,7 +16,7 @@
import uuid
from keystone import test
from keystone.tests import core as test
from keystone.common import wsgi
from keystone import config
@@ -21,7 +21,7 @@ try:
except ImportError:
from pysqlite2 import dbapi2 as dbapi
from keystone import test
from keystone.tests import core as test
from keystone.catalog.backends import templated as catalog_templated
from keystone.common.sql import legacy
@@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from keystone import test
from keystone.tests import core as test
from keystone.common import environment
from keystone import config
@@ -17,11 +17,10 @@
import uuid
import webob
from keystone import test
from keystone import config
from keystone.openstack.common import jsonutils
from keystone.openstack.common import timeutils
from keystone.tests import core as test
import default_fixtures
@@ -16,10 +16,9 @@
import uuid
from keystone import test
from keystone.common import sql
from keystone import config
from keystone.tests import core as test
import test_keystoneclient
@@ -16,7 +16,7 @@
import webob
from keystone import test
from keystone.tests import core as test
from keystone import config
from keystone import middleware
@@ -2,7 +2,7 @@
import os
import webtest
from keystone import test
from keystone.tests import core as test
def _generate_paste_config():
@@ -15,6 +15,6 @@ driver = keystone.trust.backends.kvs.Trust
driver = keystone.token.backends.kvs.Token
[signing]
certfile = ../examples/pki/certs/signing_cert.pem
keyfile = ../examples/pki/private/signing_key.pem
ca_certs = ../examples/pki/certs/cacert.pem
certfile = ../../examples/pki/certs/signing_cert.pem
keyfile = ../../examples/pki/private/signing_key.pem
ca_certs = ../../examples/pki/certs/cacert.pem
@@ -19,7 +19,7 @@ import StringIO
import tempfile
import urllib2
from keystone import test
from keystone.tests import core as test
from keystone import config
from keystone import exception
@@ -17,7 +17,7 @@
import copy
from keystone.common import serializer
from keystone import test
from keystone.tests import core as test
class XmlSerializerTestCase(test.TestCase):
@@ -14,7 +14,7 @@
import webob
from keystone import test
from keystone.tests import core as test
from keystone import config
from keystone import exception
@@ -14,7 +14,7 @@
from keystone.common import sql
from keystone import test
from keystone.tests import core as test
class CallbackMonitor:
@@ -15,8 +15,8 @@
# under the License.
"""
To run these tests against a live database:
1. Modify the file `tests/backend_sql.conf` to use the connection for your
live database
1. Modify the file `keystone/tests/backend_sql.conf` to use the connection for
your live database
2. Set up a blank, live database.
3. run the tests using
./run_tests.sh -N test_sql_upgrade
@@ -32,7 +32,7 @@ import uuid
from migrate.versioning import api as versioning_api
import sqlalchemy
from keystone import test
from keystone.tests import core as test
from keystone.common import sql
from keystone.common.sql import migration
@@ -18,7 +18,7 @@
import os
import ssl
from keystone import test
from keystone.tests import core as test
from keystone.common import environment
from keystone import config
@@ -15,7 +15,7 @@
from keystone.common import wsgi
from keystone import config
from keystone import exception
from keystone import test
from keystone.tests import core as test
CONF = config.CONF
@@ -17,7 +17,7 @@
import uuid
from keystone import exception
from keystone import test
from keystone.tests import core as test
from keystone import token
@@ -16,7 +16,7 @@
import webob
from keystone import test
from keystone.tests import core as test
from keystone import middleware
@@ -29,7 +29,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystone import test
from keystone.tests import core as test
from keystone.common import utils
@@ -4,13 +4,12 @@ import uuid
from lxml import etree
import webtest
from keystone import test
from keystone import auth
from keystone.common import serializer
from keystone import config
from keystone.openstack.common import timeutils
from keystone.policy.backends import rules
from keystone.tests import core as test
import test_content_types
@@ -19,7 +19,7 @@ from keystone import auth
from keystone.common import cms
from keystone import config
from keystone import exception
from keystone import test
from keystone.tests import core as test
import test_v3
@@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from keystone import test
from keystone.tests import core as test
from keystone import config
from keystone import controllers
@@ -14,11 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystone import test
from keystone.common import wsgi
from keystone import exception
from keystone.openstack.common import jsonutils
from keystone.tests import core as test
class FakeApp(wsgi.Application):
View File
+2 -2
View File
@@ -95,10 +95,10 @@ fi
function cleanup_test_db {
# Default test settings will leave around some test*.db files
# TODO(termie): this could probably be moved into tests/__init__.py
# TODO(termie): this could probably be moved into keystone/tests/__init__.py
# but there have been some issues with creating that
# file for some users
rm -f tests/test*.db
rm -f keystone/tests/*.db
}
function run_tests {
+1 -1
View File
@@ -64,4 +64,4 @@ detailed-errors=1
cover-package = keystone
cover-html = true
cover-erase = true
where=tests
where=keystone/tests