mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-02 02:11:19 +08:00
Rename this to be PDC-agnostic.
This commit is contained in:
@@ -32,7 +32,7 @@ class BaseConfiguration(object):
|
||||
KOJI_REPOSITORY_URL = 'https://kojipkgs.fedoraproject.org/repos'
|
||||
KOJI_TAG_PREFIXES = ['module']
|
||||
KOJI_ENABLE_CONTENT_GENERATOR = True
|
||||
PDC_CHECK_FOR_EOL = False
|
||||
CHECK_FOR_EOL = False
|
||||
PDC_URL = 'https://pdc.fedoraproject.org/rest_api/v1'
|
||||
PDC_INSECURE = False
|
||||
PDC_DEVELOP = True
|
||||
|
||||
@@ -159,7 +159,7 @@ class Config(object):
|
||||
'type': str,
|
||||
'default': 'https://mbs.fedoraproject.org/module-build-service/1/module-builds/',
|
||||
'desc': 'MBS instance url for MBSResolver'},
|
||||
'pdc_check_for_eol': {
|
||||
'check_for_eol': {
|
||||
'type': bool,
|
||||
'default': False,
|
||||
'desc': 'Flag to determine whether or not MBS should block EOL modules from building.'},
|
||||
|
||||
@@ -489,7 +489,7 @@ def _fetch_mmd(url, branch=None, allow_local_url=False, whitelist_url=False):
|
||||
"Failed to remove temporary directory {!r}: {}".format(
|
||||
td, str(e)))
|
||||
|
||||
if conf.pdc_check_for_eol:
|
||||
if conf.check_for_eol:
|
||||
if _is_eol_in_pdc(scm.name, scm.branch):
|
||||
raise ValidationError(
|
||||
'Module {}:{} is marked as EOL in PDC.'.format(scm.name, scm.branch))
|
||||
|
||||
@@ -414,7 +414,7 @@ class TestBuild:
|
||||
# Make sure the build is done
|
||||
assert module_build.state == models.BUILD_STATES['ready']
|
||||
|
||||
@patch('module_build_service.config.Config.pdc_check_for_eol',
|
||||
@patch('module_build_service.config.Config.check_for_eol',
|
||||
new_callable=PropertyMock, return_value=True)
|
||||
@patch('module_build_service.utils.submit._is_eol_in_pdc', return_value=True)
|
||||
@patch('module_build_service.auth.get_user', return_value=user)
|
||||
|
||||
Reference in New Issue
Block a user