keystone/keystone/tests/test_backend_rules.py
Morgan Fainberg fa807ae345 Removal of test .conf files
The following configuration files used for testing purposes have
been migrated to use the configuration fixture instead of relying
on a mechanism to load a large number of configuration options
from various locations on disk.

    keystone/tests/auth_plugin_external_default_legacy.conf
    keystone/tests/auth_plugin_external_disabled.conf
    keystone/tests/auth_plugin_external_domain.conf
    keystone/tests/auth_plugin_external_domain_legacy.conf
    keystone/tests/backend_rules.conf
    keystone/tests/test_associate_project_endpoint_extension.conf
    keystone/tests/test_auth_plugin_by_class_name.conf
    keystone/tests/test_overrides.conf
    keystone/tests/test_pki_token_provider.conf
    keystone/tests/test_revoke_kvs.conf
    keystone/tests/test_revoke_sql.conf
    keystone/tests/test_uuid_token_provider.conf

The following configuration files have had a number of elements
extracted to be used within the config fixture instead of the
configuration files. Most of these files contain controls that
need to be overridden to test against alternative (non internal /
in-memory) "live" configurations.

   keystone/tests/backend_ldap.conf
   keystone/tests/backend_liveldap.conf
   keystone/tests/backend_multi_ldap_sql.conf
   keystone/tests/backend_sql.conf
   keystone/tests/backend_tls_liveldap.conf

This patchset also consolidates the setting of the default
[database] ``connection`` option so that it can be overridden
as needed for testing against non-sqlite database engines.

Change-Id: I996709546f713c36bf654c5aea64cbf3472ffef1
2014-03-17 00:17:39 -07:00

63 lines
2.2 KiB
Python

# Copyright 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from keystone import exception
from keystone import tests
from keystone.tests import test_backend
class RulesPolicy(tests.TestCase, test_backend.PolicyTests):
def setUp(self):
super(RulesPolicy, self).setUp()
self.load_backends()
def config_overrides(self):
super(RulesPolicy, self).config_overrides()
self.config_fixture.config(
group='policy',
driver='keystone.policy.backends.rules.Policy')
def test_create(self):
self.assertRaises(exception.NotImplemented,
super(RulesPolicy, self).test_create)
def test_get(self):
self.assertRaises(exception.NotImplemented,
super(RulesPolicy, self).test_get)
def test_list(self):
self.assertRaises(exception.NotImplemented,
super(RulesPolicy, self).test_list)
def test_update(self):
self.assertRaises(exception.NotImplemented,
super(RulesPolicy, self).test_update)
def test_delete(self):
self.assertRaises(exception.NotImplemented,
super(RulesPolicy, self).test_delete)
def test_get_policy_404(self):
self.assertRaises(exception.NotImplemented,
super(RulesPolicy, self).test_get_policy_404)
def test_update_policy_404(self):
self.assertRaises(exception.NotImplemented,
super(RulesPolicy, self).test_update_policy_404)
def test_delete_policy_404(self):
self.assertRaises(exception.NotImplemented,
super(RulesPolicy, self).test_delete_policy_404)