From c5aeaf6aff323a5f0cdb96d4f05e7fb8e0499d4b Mon Sep 17 00:00:00 2001 From: Adam Young Date: Fri, 9 Sep 2016 09:50:57 -0400 Subject: [PATCH] Test that v3fedkerb plugin loads Currently the v3fedkerb plugin loads the incorrect parameters. This was never tested. This patch introduces a test and a future patch will fix the code and modify the test. Change-Id: Ia7fb7f1d7db0510df42798b9d668d58070234aff --- .../extras/kerberos/test_fedkerb_loading.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 keystoneauth1/tests/unit/extras/kerberos/test_fedkerb_loading.py diff --git a/keystoneauth1/tests/unit/extras/kerberos/test_fedkerb_loading.py b/keystoneauth1/tests/unit/extras/kerberos/test_fedkerb_loading.py new file mode 100644 index 00000000..2b189fcc --- /dev/null +++ b/keystoneauth1/tests/unit/extras/kerberos/test_fedkerb_loading.py @@ -0,0 +1,33 @@ +# 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 keystoneauth1 import loading +from keystoneauth1.tests.unit import utils as test_utils + + +class FedKerbLoadingTests(test_utils.TestCase): + + def test_options(self): + opts = [o.name for o in + loading.get_plugin_loader('v3fedkerb').get_options()] + + allowed_opts = ['domain-id', + 'domain-name', + 'project-id', + 'project-name', + 'project-domain-id', + 'project-domain-name', + 'trust-id', + 'auth-url', + ] + + self.assertItemsEqual(allowed_opts, opts)