Remove test_metadata_invalid_contact_type
oslo.config will ensure option [saml]/idp_contact_type with parameter choices only allow values in ('technical', 'support', 'administrative', 'billing', 'other') in runtime, so don't need test in KeyStone. This commit also remove check code for the option. Partial-Bug: #1686921 Related-Bug: #1517839 Change-Id: I0c78a25a353d04dbe46e9679771c51b22b677a27
This commit is contained in:
parent
e18923daa1
commit
5da589a8f6
@ -568,18 +568,12 @@ class MetadataGenerator(object):
|
||||
CONF.saml.idp_contact_name,
|
||||
CONF.saml.idp_contact_surname,
|
||||
CONF.saml.idp_contact_email,
|
||||
CONF.saml.idp_contact_telephone]
|
||||
CONF.saml.idp_contact_telephone,
|
||||
CONF.saml.idp_contact_type]
|
||||
for value in params:
|
||||
if value is None:
|
||||
return False
|
||||
|
||||
# Check if contact type is an invalid value
|
||||
valid_type_values = ['technical', 'other', 'support', 'administrative',
|
||||
'billing']
|
||||
if CONF.saml.idp_contact_type not in valid_type_values:
|
||||
msg = _('idp_contact_type must be one of: [technical, other, '
|
||||
'support, administrative or billing.')
|
||||
raise exception.ValidationError(msg)
|
||||
return True
|
||||
|
||||
def _check_organization_values(self):
|
||||
|
@ -3999,13 +3999,6 @@ class IdPMetadataGenerationTests(test_v3.RestfulTestCase):
|
||||
self.assertIsNotNone(idpsso_descriptor.organization)
|
||||
self.assertEqual([], idpsso_descriptor.contact_person)
|
||||
|
||||
def test_metadata_invalid_contact_type(self):
|
||||
self.config_fixture.config(
|
||||
group='saml',
|
||||
idp_contact_type="invalid")
|
||||
self.assertRaises(exception.ValidationError,
|
||||
self.generator.generate_metadata)
|
||||
|
||||
def test_metadata_invalid_idp_sso_endpoint(self):
|
||||
self.config_fixture.config(
|
||||
group='saml',
|
||||
|
Loading…
Reference in New Issue
Block a user