Skip to content

Commit

Permalink
Update default setting
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsasha committed Nov 24, 2021
1 parent 857bfbb commit 1bb7212
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 5 additions & 0 deletions irrd/conf/default_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ irrd:
auth:
gnupg_keyring: null
authenticate_parents_route_creation: true
set_creation:
COMMON:
prefix_required: true
autnum_authentication: opportunistic

email:
footer: ''
notification_header: |
Expand Down
8 changes: 1 addition & 7 deletions irrd/updates/tests/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,7 @@ def test_as_set_autnum_disabled(self, prepare_mocks, config_override):
['rpsl_pks', ({'TEST-MNT'},), {}],
]

def test_as_set_autnum_opportunistic_exists(self, prepare_mocks, config_override):
config_override({'auth': {'set_creation': {'as-set': {'autnum_authentication': 'opportunistic'}}}})
def test_as_set_autnum_opportunistic_exists_default(self, prepare_mocks, config_override):
validator, mock_dq, mock_dh = prepare_mocks
as_set = rpsl_object_from_text(SAMPLE_AS_SET)
assert as_set.clean_for_create() # fill pk_asn_segment
Expand Down Expand Up @@ -506,11 +505,6 @@ def test_as_set_autnum_opportunistic_exists(self, prepare_mocks, config_override
result = validator.process_auth(as_set, None)
assert result.is_valid()

# Default is disabled
config_override({})
result = validator.process_auth(as_set, None)
assert result.is_valid()

def test_as_set_autnum_opportunistic_does_not_exist(self, prepare_mocks, config_override):
config_override({'auth': {'set_creation': {
AUTH_SET_CREATION_COMMON_KEY: {'autnum_authentication': 'opportunistic'}
Expand Down

0 comments on commit 1bb7212

Please sign in to comment.