mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-06-14 22:17:34 +08:00
Optionally, block building modules with EOL streams.
Requested by @mboddu in: - https://pagure.io/fm-orchestrator/issue/960 - https://pagure.io/modularity/issue/102
This commit is contained in:
@@ -551,6 +551,34 @@ class TestUtils:
|
||||
expected_tag = 'module-1cf457d452e54dda'
|
||||
assert tag == expected_tag
|
||||
|
||||
@patch("module_build_service.utils.submit.requests")
|
||||
def test_pdc_eol_check(self, requests):
|
||||
""" Push mock pdc responses through the eol check function. """
|
||||
|
||||
response = mock.Mock()
|
||||
response.json.return_value = {"results": [{
|
||||
"id": 347907,
|
||||
"global_component": "mariadb",
|
||||
"name": "10.1",
|
||||
"slas": [{
|
||||
"id": 694207,
|
||||
"sla": "security_fixes",
|
||||
"eol": "2019-12-01",
|
||||
}],
|
||||
"type": "module",
|
||||
"active": True,
|
||||
"critical_path": False,
|
||||
}]}
|
||||
requests.get.return_value = response
|
||||
|
||||
is_eol = module_build_service.utils.submit._is_eol_in_pdc('mariadb', '10.1')
|
||||
assert not is_eol
|
||||
|
||||
response.json.return_value["results"][0]["active"] = False
|
||||
|
||||
is_eol = module_build_service.utils.submit._is_eol_in_pdc('mariadb', '10.1')
|
||||
assert is_eol
|
||||
|
||||
|
||||
class DummyModuleBuilder(GenericBuilder):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user