From e105e8ce143e329f9b2345f730e6009c7fa6fe99 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Tue, 21 Apr 2020 20:02:37 -0700 Subject: [PATCH] Don't test openstack_groups on stable branches Without this patch, the stable keystone branches fail the K2K tests because they don't support the assertion feature added in #1687593 and we don't intend to backport it. This change allows the stable branches to still be tested using a regular static group mapping. Change-Id: Ie1be1cc0e961a1584c99247f0c1b0032576718d8 --- keystone_tempest_plugin/config.py | 6 ++++++ .../tests/scenario/test_federated_authentication.py | 3 +++ 2 files changed, 9 insertions(+) diff --git a/keystone_tempest_plugin/config.py b/keystone_tempest_plugin/config.py index d3e3c02..25964a8 100644 --- a/keystone_tempest_plugin/config.py +++ b/keystone_tempest_plugin/config.py @@ -58,6 +58,12 @@ FedScenarioGroup = [ default='federated_domain', help='The domain name where the "mapping_group_name" is ' 'created.'), + # TODO(cmurphy): remove this option and set to true when all supported + # branches support the openstack_groups feature + cfg.BoolOpt('enable_k2k_groups_mapping', + default=False, + help='Whether to test support for openstack_groups in the K2K ' + 'SAML assertion (lp#1687593)'), # Protocol cfg.StrOpt('protocol_id', diff --git a/keystone_tempest_plugin/tests/scenario/test_federated_authentication.py b/keystone_tempest_plugin/tests/scenario/test_federated_authentication.py index bb06748..a99118d 100644 --- a/keystone_tempest_plugin/tests/scenario/test_federated_authentication.py +++ b/keystone_tempest_plugin/tests/scenario/test_federated_authentication.py @@ -260,6 +260,9 @@ class TestK2KFederatedAuthentication(TestSaml2EcpFederatedAuthentication): url.netloc) def _setup_mapping(self): + if not CONF.fed_scenario.enable_k2k_groups_mapping: + super(TestK2KFederatedAuthentication, self)._setup_mapping() + return self.mapping_id = data_utils.rand_uuid_hex() rules = [{ 'local': [