Only validates values if present in options. Fixing authority test to parse plugin information. (#713)

This commit is contained in:
kevgliss 2017-03-06 20:38:04 -08:00 committed by GitHub
parent 038beafb5e
commit 602c5580d3
2 changed files with 4 additions and 1 deletions

View File

@ -35,6 +35,9 @@ def validate_options(options):
interval = get_plugin_option('interval', options)
unit = get_plugin_option('unit', options)
if not interval and not unit:
return
if interval == 'month':
unit *= 30

View File

@ -13,7 +13,7 @@ def test_authority_input_schema(client, role):
'owner': 'jim@example.com',
'description': 'An example authority.',
'commonName': 'AnExampleAuthority',
'pluginName': {'slug': 'verisign-issuer'},
'plugin': {'slug': 'verisign-issuer', 'plugin_options': [{'name': 'test', 'value': 'blah'}]},
'type': 'root',
'signingAlgorithm': 'sha256WithRSA',
'keyType': 'RSA2048',