Skip to content

Commit 8b93110

Browse files
committed
Update basic template schema in scratch catalog step
A basic schema underwent a breaking change in new opm version and needs to be updated in the build scratch catalog task. JIRA: ISV-5164 Signed-off-by: Ales Raszka <[email protected]>
1 parent 8ef53c2 commit 8b93110

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

ansible/inventory/group_vars/operator-pipeline-integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ integration_tests_src_operator_git_branch: e2e-test-operator
2424
integration_tests_src_operator_package_name: test-e2e-operator
2525
integration_tests_src_operator_bundle_version: 0.0.8
2626

27-
integration_tests_ocp_versions_range: "=v4.14"
27+
integration_tests_ocp_versions_range: "=v4.15"
2828

2929
integration_tests_fbc_catalog: false
3030
integration_tests_verify_bundle_in_catalog: true

operator-pipeline-images/operatorcert/entrypoints/build_scratch_catalog.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,14 @@ def generate_and_save_basic_template( # pylint: disable=too-many-arguments
8989
}
9090

9191
bundles = {"schema": "olm.bundle", "image": bundle_pullspec}
92+
template = {
93+
"schema": "olm.template.basic",
94+
"entries": [package_obj, channel, bundles],
95+
}
9296

9397
with open(template_path, "w", encoding="utf-8") as f:
94-
yaml.safe_dump_all(
95-
[package_obj, channel, bundles],
98+
yaml.safe_dump(
99+
template,
96100
f,
97101
explicit_start=True,
98102
indent=2,

operator-pipeline-images/tests/entrypoints/test_build_scratch_catalog.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ def test_setup_argparser() -> None:
1010
assert build_scratch_catalog.setup_argparser() is not None
1111

1212

13-
@patch("operatorcert.entrypoints.build_scratch_catalog.yaml.safe_dump_all")
14-
def test_generate_and_save_basic_template(mock_yaml_dump_all: MagicMock) -> None:
13+
@patch("operatorcert.entrypoints.build_scratch_catalog.yaml.safe_dump")
14+
def test_generate_and_save_basic_template(mock_yaml_dump: MagicMock) -> None:
1515
with patch(
1616
"operatorcert.entrypoints.build_scratch_catalog.open", mock.mock_open()
1717
) as mock_open:
@@ -37,10 +37,14 @@ def test_generate_and_save_basic_template(mock_yaml_dump_all: MagicMock) -> None
3737
}
3838

3939
bundles = {"schema": "olm.bundle", "image": "bundle_pullspec"}
40+
template = {
41+
"schema": "olm.template.basic",
42+
"entries": [package_obj, channel, bundles],
43+
}
4044

4145
mock_open.assert_called_once_with("template.yaml", "w", encoding="utf-8")
42-
mock_yaml_dump_all.assert_called_once_with(
43-
[package_obj, channel, bundles],
46+
mock_yaml_dump.assert_called_once_with(
47+
template,
4448
mock_open.return_value,
4549
explicit_start=True,
4650
indent=2,

0 commit comments

Comments
 (0)