test(#1339): add test for FBC with empty index_repo_map#1341
Conversation
Add a fourth parametrize entry to test_overwrite_from_index covering
the case where is_image_fbc=True but url_repo_map is empty ({}). This
tests the guard added in PR #1338 (commit cad01fa) that skips
get_catalog_dir and push_configs_to_git when the index_repo_map is
empty (containerized IIB path where push was already done earlier).
Changes:
- Add parametrize case: FBC=True, empty url_repo_map, different
registries (no OCI export)
- Update assertion condition from `if is_image_fbc` to
`if is_image_fbc and url_repo_map` to match production guard
- Add mock_pcg.assert_not_called() in the else branch to verify
push_configs_to_git is also skipped when appropriate
Note: Full pytest suite could not run due to missing krb5-dev
system library (required by gssapi/requests-kerberos). Test logic
was validated via isolated mock-based execution of all 4 cases.
Closes #1339
ReviewFindingsInfo
No blocking findings. The new parametrize case correctly exercises the |
Add a fourth parametrize entry to test_overwrite_from_index covering the case where is_image_fbc=True but url_repo_map is empty ({}). This tests the guard added in PR #1338 (commit cad01fa) that skips get_catalog_dir and push_configs_to_git when the index_repo_map is empty (containerized IIB path where push was already done earlier).
Changes:
registries (no OCI export)
if is_image_fbctoif is_image_fbc and url_repo_mapto match production guardpush_configs_to_git is also skipped when appropriate
Note: Full pytest suite could not run due to missing krb5-dev system library (required by gssapi/requests-kerberos). Test logic was validated via isolated mock-based execution of all 4 cases.
Closes #1339
Post-script verification
agent/1339-test-fbc-empty-map)cad01fa661edff773b3c3e340fb5a8865906dcaf..HEAD)