Skip to content

test(#1339): add test for FBC with empty index_repo_map#1341

Merged
yashvardhannanavati merged 1 commit into
mainfrom
agent/1339-test-fbc-empty-map
Jun 5, 2026
Merged

test(#1339): add test for FBC with empty index_repo_map#1341
yashvardhannanavati merged 1 commit into
mainfrom
agent/1339-test-fbc-empty-map

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown

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

Post-script verification

  • Branch is not main/master (agent/1339-test-fbc-empty-map)
  • Secret scan passed (gitleaks — cad01fa661edff773b3c3e340fb5a8865906dcaf..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

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
@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Info

  • [test-integrity] tests/test_workers/test_tasks/test_build.py:469 — Pre-existing duplicate assertion: mock_pcg.assert_called_once_with(...) appears twice in sequence (lines 462–468 and 469–475). This is redundant but harmless — the second call re-verifies the same condition. Not introduced by this PR.

  • [test-adequacy] tests/test_workers/test_tasks/test_build.py:489 — The addition of mock_pcg.assert_not_called() in the else branch is a good improvement. It strengthens coverage for both existing case 2 (is_image_fbc=False) and new case 4 (is_image_fbc=True, url_repo_map={}), ensuring push_configs_to_git is not called when the FBC-with-repo-map path is skipped.

No blocking findings. The new parametrize case correctly exercises the is_image_fbc=True with empty url_repo_map scenario, the assertion condition change accurately mirrors the production guard added in PR #1338, and the new negative assertion strengthens test coverage.

Comment thread tests/test_workers/test_tasks/test_build.py
@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Jun 5, 2026
@yashvardhannanavati yashvardhannanavati merged commit 9e40590 into main Jun 5, 2026
19 checks passed
@yashvardhannanavati yashvardhannanavati deleted the agent/1339-test-fbc-empty-map branch June 5, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge All reviewers approved — ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant