Skip to content

OSAC-706: E2E tests for catalog item lifecycle#44

Open
tzvatot wants to merge 3 commits into
osac-project:mainfrom
tzvatot:OSAC-58/catalog-items-e2e-tests
Open

OSAC-706: E2E tests for catalog item lifecycle#44
tzvatot wants to merge 3 commits into
osac-project:mainfrom
tzvatot:OSAC-58/catalog-items-e2e-tests

Conversation

@tzvatot

@tzvatot tzvatot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Add E2E tests for the catalog items feature (OSAC-58 epic, Phase 6).

Tests:

  1. test_catalog_item_crud — Create, list, get, delete via gRPC (private + public APIs)
  2. test_unpublished_catalog_item_not_visible_in_public_api — Unpublished items hidden from public List/Get
  3. test_create_cluster_with_catalog_item — CLI creates cluster with --catalog-item, verifies spec
  4. test_create_cluster_with_unpublished_catalog_item_fails — Server rejects unpublished catalog item
  5. test_delete_catalog_item_blocked_when_referenced — Delete blocked when cluster references item

Infrastructure changes:

  • GRPCClient: Add call_unchecked, get_cluster, and 4 catalog item methods
  • OsacCLI: Add create_cluster_with_catalog_item

Test plan

  • Verify on vmaas-dev cluster

Jira: OSAC-706

Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Added end-to-end coverage for the catalog item lifecycle, including create/read behavior, publication vs. visibility through the public gRPC API, and cluster reference handling.
    • Expanded gRPC test client support with ClusterCatalogItem create/get/list/delete operations, plus an option to run unchecked calls.
    • Enhanced CLI test utilities with shared UUID parsing and added cluster creation via catalog item.
    • Added cleanup improvements and a known limitation test (expected failure) for referenced-item deletion enforcement.

@openshift-ci

openshift-ci Bot commented May 20, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot

openshift-ci-robot commented May 20, 2026

Copy link
Copy Markdown

@tzvatot: This pull request references OSAC-706 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

Add E2E tests for the catalog items feature (OSAC-58 epic, Phase 6).

Tests:

  1. test_catalog_item_crud — Create, list, get, delete via gRPC (private + public APIs)
  2. test_unpublished_catalog_item_not_visible_in_public_api — Unpublished items hidden from public List/Get
  3. test_create_cluster_with_catalog_item — CLI creates cluster with --catalog-item, verifies spec
  4. test_create_cluster_with_unpublished_catalog_item_fails — Server rejects unpublished catalog item
  5. test_delete_catalog_item_blocked_when_referenced — Delete blocked when cluster references item

Infrastructure changes:

  • GRPCClient: Add call_unchecked, get_cluster, and 4 catalog item methods
  • OsacCLI: Add create_cluster_with_catalog_item

Test plan

  • Verify on vmaas-dev cluster

Jira: OSAC-706

Generated with Claude Code

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci

openshift-ci Bot commented May 20, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tzvatot

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This PR adds comprehensive test infrastructure and end-to-end test coverage for cluster catalog items. It includes a configurable test fixture, gRPC and CLI helper methods for catalog operations, and six test cases covering creation, visibility enforcement, cluster integration, and deletion constraints with proper resource cleanup.

Changes

Catalog Item Test Infrastructure and Coverage

Layer / File(s) Summary
Test fixture foundation
tests/catalog/conftest.py
Session-scoped cluster_template() fixture reads OSAC_CLUSTER_TEMPLATE environment variable or defaults to osac.templates.ocp_4_17_small template, providing configurable cluster configuration for all catalog tests.
gRPC client refactoring and catalog operations
tests/core/grpc_client.py
Imports run_unchecked to support non-fatal gRPC execution. Introduces _build_args() internal helper to consolidate gRPC argument construction (auth header, JSON body). Adds call_unchecked() method returning (output, exit_code) tuples for validating expected failures. Implements four catalog item methods: create_cluster_catalog_item() (with optional field definitions), get_cluster_catalog_item(), list_cluster_catalog_item_ids(), and delete_cluster_catalog_item() wired to private and public ClusterCatalogItems service endpoints.
CLI infrastructure refactoring and catalog integration
tests/core/osac_cli.py
Introduces _parse_uuid() static method to centralize single-quoted UUID extraction from CLI stdout via regex, eliminating duplication. Refactors create_compute_instance() and create_cluster() to reuse _parse_uuid(). Adds create_cluster_with_catalog_item() to invoke create cluster --catalog-item ... --name ... and return the cluster UUID.
Test utilities for lifecycle validation
tests/catalog/test_catalog_item_lifecycle.py
_unique_name() helper generates unique names by appending UUID-derived suffix to a prefix. _wait_cluster_removed() polling helper waits (up to 30 seconds) for a cluster ID to disappear from gRPC cluster listings, enabling post-deletion verification.
Catalog item lifecycle test suite
tests/catalog/test_catalog_item_lifecycle.py
Six tests verify: (1) CRUD lifecycle—create published item, list via gRPC, validate fields, delete and verify removal; (2) unpublished visibility—unpublished items invisible to public gRPC APIs and fail Get requests; (3) cluster creation with published items—clusters reference and store catalog item IDs; (4) cluster creation with unpublished items fails with CalledProcessError; (5) cluster deletion cleanup with polling; (6) referential integrity blocking (marked xfail)—deletion of referenced catalog items returns non-zero exit code. All tests use try/finally blocks and unique names to ensure cleanup even on failure.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

lgtm

Suggested reviewers

  • jhernand
  • akshaynadkarni
  • eranco74

Poem

📋 Catalog items now have tests so tight,
Visibility rules and references shine bright,
Published or not—the tests take their flight,
With gRPC and CLI helpers in sight,
Access control locked in place just right!


Security & Risk Assessment

Low Risk. This PR adds test infrastructure without modifying production code. The tests validate critical security and integrity controls:

  • Visibility enforcement (High value): Unpublished catalog items correctly fail when accessed through the public gRPC API, preventing unintended exposure of draft content.
  • Referential integrity blocking (High value): Deletion of referenced catalog items returns a non-zero error code (xfail), preventing orphaned cluster specifications. Server-side enforcement is still in progress.
  • Resource cleanup (Medium value): All test fixtures and test cases use try/finally blocks to guarantee cleanup even on assertion failures, preventing test-environment resource leaks and pollution between test runs.
  • Exit code validation (Medium value): Use of call_unchecked() to capture non-zero exit codes enables proper testing of expected failures without suppressing legitimate errors.

No credentials, secrets, or sensitive data are introduced. The test infrastructure safely uses environment variables and CLI parsers to extract UUIDs and validate API responses.

🚥 Pre-merge checks | ✅ 9 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Ai-Attribution ⚠️ Warning PR explicitly states AI tool use (Claude Code) but commit message lacks proper Red Hat attribution trailer format (should be "Generated-with: Claude Code" not informal "Generated with [Claude Code]"). Update commit message to use proper trailer format: add "Generated-with: Claude Code" as a Git trailer (colon-delimited, no markdown) after commit body.
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately reflects the primary purpose of the pull request: adding end-to-end tests for the catalog item lifecycle feature.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Hardcoded-Secrets ✅ Passed No hardcoded secrets found. All code uses environment variables (with safe defaults), injected parameters, and UUID-based identifiers. No API keys, tokens, passwords, base64 credentials, or embedde...
No-Weak-Crypto ✅ Passed No weak cryptographic algorithms, custom crypto implementations, or insecure token comparisons detected. The PR adds test code that delegates crypto operations to standard libraries and external se...
No-Injection-Vectors ✅ Passed No injection vectors detected. All subprocess calls use argument lists (not shell strings), JSON data is properly serialized, and user input is safely handled without eval/exec, shell=True, SQL con...
Container-Privileges ✅ Passed Pull request contains only Python test code with no container/Kubernetes manifests or privileged configurations. Check not applicable to test additions.
No-Sensitive-Data-In-Logs ✅ Passed No sensitive data (passwords, tokens, API keys, PII, session IDs, hostnames) is directly logged in the new code. Assertion messages log gRPC/CLI responses, not command arguments. Bearer token appea...

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tzvatot

tzvatot commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

This PR is in draft because it depends on fulfillment-service#595 (filter unpublished catalog items from public API). The test_unpublished_catalog_item_not_visible_in_public_api test will fail until that server-side fix is deployed. Will promote to ready once #595 is merged.

@tzvatot tzvatot force-pushed the OSAC-58/catalog-items-e2e-tests branch from f0d016a to bc80ea1 Compare June 1, 2026 15:28
@tzvatot tzvatot marked this pull request as ready for review June 1, 2026 15:28
@openshift-ci openshift-ci Bot requested review from larsks and omer-vishlitzky June 1, 2026 15:28
@tzvatot tzvatot marked this pull request as draft June 1, 2026 15:31

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/catalog/test_catalog_item_lifecycle.py`:
- Around line 73-77: Replace the manual try/except pattern with pytest's context
manager: wrap the call to
cli.create_cluster_with_catalog_item(catalog_item=catalog_item_id,
name=cluster_name) inside pytest.raises(subprocess.CalledProcessError) so the
test asserts the call fails idiomatically (this removes the manual raise
AssertionError and silences the Ruff TRY003 warning); keep the same exception
type (subprocess.CalledProcessError) and the exact call to
cli.create_cluster_with_catalog_item to locate the change.
- Around line 60-63: The teardown deletes the cluster with
cli.delete_cluster(uuid=cluster_id) then immediately calls the checked
grpc.delete_cluster_catalog_item(catalog_item_id=catalog_item_id), which can
flake if the cluster still references the catalog item; update both teardown
sites (around lines shown) to poll until the cluster is removed from gRPC before
deleting the catalog item—use grpc.list_cluster_ids() in a small loop or reuse
the existing wait_for_cluster_grpc_removal(cluster_id) helper to wait for
removal, then call
grpc.delete_cluster_catalog_item(catalog_item_id=catalog_item_id).

In `@tests/core/grpc_client.py`:
- Around line 88-93: call_unchecked duplicates the grpcurl argument construction
from call, risking drift; extract a shared helper (e.g., build_grpcurl_args or
_grpcurl_args) that accepts token, address, service, and optional data and
returns the args list, then replace the construction in both call and
call_unchecked to use that helper so the Authorization header and transport
flags are maintained in one place (ensure the helper handles -insecure, -H
Authorization: Bearer {token}, optional -d json.dumps(data), and appends address
and service).

In `@tests/core/osac_cli.py`:
- Around line 105-109: Duplicate logic parsing a UUID from CLI stdout appears in
create_compute_instance, create_cluster, and create_cluster_with_catalog_item;
extract that into a single helper (e.g., parse_uuid_from_stdout or
_extract_uuid) on the same test class or module, implement it to run the regex
re.search(r"'([^']+)'", stdout) with the assert and return group(1), then
replace the inlined match/assert/group(1) sequences in create_compute_instance,
create_cluster, and create_cluster_with_catalog_item to call the new helper so
all parsing is centralized and consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 6b1916ec-5039-4b63-ba9b-74a3b598b9a4

📥 Commits

Reviewing files that changed from the base of the PR and between a9ccd7e and bc80ea1.

📒 Files selected for processing (5)
  • tests/catalog/__init__.py
  • tests/catalog/conftest.py
  • tests/catalog/test_catalog_item_lifecycle.py
  • tests/core/grpc_client.py
  • tests/core/osac_cli.py

Comment thread tests/catalog/test_catalog_item_lifecycle.py
Comment thread tests/catalog/test_catalog_item_lifecycle.py Outdated
Comment thread tests/core/grpc_client.py Outdated
Comment thread tests/core/osac_cli.py Outdated
@tzvatot tzvatot force-pushed the OSAC-58/catalog-items-e2e-tests branch from 9dc0722 to 747b38e Compare June 9, 2026 08:36
tzvatot added 3 commits June 11, 2026 10:32
Add 5 E2E tests covering catalog item CRUD, visibility filtering,
cluster creation via catalog item, unpublished rejection, and
delete-when-referenced protection.

Extend GRPCClient with catalog item operations (create, get, list,
delete) and call_unchecked for negative test cases. Add CLI helper
for creating clusters with --catalog-item flag.

Generated with [Claude Code](https://claude.com/claude-code)
Fix grpcurl error code matching to use case-insensitive comparison
(grpcurl returns 'NotFound' not 'NOT_FOUND'). Mark
test_delete_catalog_item_blocked_when_referenced as xfail since the
server does not yet enforce referential integrity on catalog item
deletion.

Generated with [Claude Code](https://claude.com/claude-code)
- Extract _build_args in GRPCClient to prevent checked/unchecked drift
- Extract _parse_uuid in OsacCLI to deduplicate UUID parsing
- Use pytest.raises for expected-failure assertion
- Wait for cluster removal before deleting catalog item in teardown

Generated with [Claude Code](https://claude.com/claude-code)
@tzvatot tzvatot force-pushed the OSAC-58/catalog-items-e2e-tests branch from 747b38e to 8c40aa0 Compare June 11, 2026 07:37
@alosadagrande

Copy link
Copy Markdown

The test:

  • test_delete_catalog_item_blocked_when_referenced — Delete blocked when cluster references item

Now it is expected to work as I can see from my tests in my local OSAC env. Could you remove the expected result?

=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.14.5, pytest-9.1.0, pluggy-1.6.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/alosadag/SYSENG/ACCELERATOR-TEAM/OSAC/osac-workspace/osac-test-infra
configfile: pyproject.toml
plugins: anyio-4.13.0
collected 5 items                                                                                                                                                                                                 

tests/catalog/test_catalog_item_lifecycle.py::test_catalog_item_crud PASSED                                                                                                                                 [ 20%]
tests/catalog/test_catalog_item_lifecycle.py::test_unpublished_catalog_item_not_visible_in_public_api PASSED                                                                                                [ 40%]
tests/catalog/test_catalog_item_lifecycle.py::test_create_cluster_with_catalog_item PASSED                                                                                                                  [ 60%]
tests/catalog/test_catalog_item_lifecycle.py::test_create_cluster_with_unpublished_catalog_item_fails PASSED                                                                                                [ 80%]
tests/catalog/test_catalog_item_lifecycle.py::test_delete_catalog_item_blocked_when_referenced XPASS (Server does not yet block deletion of referenced catalog items)                                       [100%]

========================================================================================== 4 passed, 1 xpassed in 34.93s ==========================================================================================

@alosadagrande

Copy link
Copy Markdown

/lgtm

coderabbitai[bot]
coderabbitai Bot previously requested changes Jun 16, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/catalog/test_catalog_item_lifecycle.py`:
- Around line 52-54: The assertion on line 54 relies on fragile string matching
of the error message output from the grpc.call_unchecked call, checking for "not
published" or "not found" substrings. This test will break if error message
wording changes without any actual functional regression. Instead of matching
against specific error message strings, check for a specific gRPC status code or
structured error code field in the response if the grpc.call_unchecked response
supports it. If the response structure does not expose error codes, document the
string matching limitation; otherwise refactor the assertion to verify the error
code rather than the message text.
- Around line 17-22: The `_wait_cluster_removed` function silently returns when
the deadline is exceeded without raising an exception, allowing test teardown to
proceed even when the cluster is still registered. After the while loop exits,
add a check to determine if the cluster_id is still present in
grpc.list_cluster_ids(). If the cluster remains registered after the deadline
has passed, raise a TimeoutError with a descriptive message instead of returning
silently. This ensures that cluster removal failures are properly surfaced
rather than masked by downstream referential integrity errors during catalog
item deletion.
- Around line 37-40: The test in test_catalog_item_lifecycle.py has a critical
logic error where catalog_item_id is set to an empty string on line 38
immediately after calling grpc.delete_cluster_catalog_item(), and then line 40
asserts that this empty string is not in the catalog item list. This assertion
always passes regardless of whether the deletion succeeded, because an empty
string will never be in the ID list. To fix this, move the assertion on line 40
to execute before line 38 reassigns catalog_item_id to an empty string, so the
assertion actually verifies that the original catalog_item_id value has been
removed from the list returned by grpc.list_cluster_catalog_item_ids().
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 399d15cf-017d-4dab-9f84-e56c7437a573

📥 Commits

Reviewing files that changed from the base of the PR and between bc80ea1 and 8c40aa0.

📒 Files selected for processing (5)
  • tests/catalog/__init__.py
  • tests/catalog/conftest.py
  • tests/catalog/test_catalog_item_lifecycle.py
  • tests/core/grpc_client.py
  • tests/core/osac_cli.py

Comment on lines +17 to +22
def _wait_cluster_removed(grpc: GRPCClient, cluster_id: str, timeout: int = 30) -> None:
deadline = time.monotonic() + timeout
while cluster_id in grpc.list_cluster_ids():
if time.monotonic() > deadline:
break
time.sleep(2)

@coderabbitai coderabbitai Bot Jun 16, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚖️ Poor tradeoff

Missing timeout exception masks cluster removal failures.

_wait_cluster_removed breaks silently when the deadline is exceeded without raising an exception. This allows teardown to proceed to catalog item deletion even when the cluster is still registered, causing downstream gRPC referential integrity failures that mask the actual removal problem.

Risk severity: Major — Silent timeouts produce misleading test failures and can leave orphaned catalog items when the real issue is cluster deletion/deregistration lag.

🛡️ Proposed fix to raise TimeoutError on deadline breach
 def _wait_cluster_removed(grpc: GRPCClient, cluster_id: str, timeout: int = 30) -> None:
     deadline = time.monotonic() + timeout
     while cluster_id in grpc.list_cluster_ids():
         if time.monotonic() > deadline:
-            break
+            raise TimeoutError(f"Cluster {cluster_id} still present after {timeout}s")
         time.sleep(2)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/catalog/test_catalog_item_lifecycle.py` around lines 17 - 22, The
`_wait_cluster_removed` function silently returns when the deadline is exceeded
without raising an exception, allowing test teardown to proceed even when the
cluster is still registered. After the while loop exits, add a check to
determine if the cluster_id is still present in grpc.list_cluster_ids(). If the
cluster remains registered after the deadline has passed, raise a TimeoutError
with a descriptive message instead of returning silently. This ensures that
cluster removal failures are properly surfaced rather than masked by downstream
referential integrity errors during catalog item deletion.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added to #70

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alosadagrande, thanks for tracking it in #70. The silent break will stay a potential source of confusing failures until that's addressed — worth keeping an eye on it.


🧠 Learnings used
Learnt from: tzvatot
Repo: osac-project/osac-test-infra PR: 44
File: tests/catalog/test_catalog_item_lifecycle.py:52-54
Timestamp: 2026-06-16T11:30:30.149Z
Learning: When reviewing Python E2E tests that use `GRPCClient.call_unchecked()` (from `tests/core/grpc_client.py` in this repo), allow assertions that match on the returned gRPC `output` string (e.g., substring/regex checks) and do not flag them as “fragile” solely on that basis. `call_unchecked()` only returns `(output: str, exit_code: int)` and does not provide structured gRPC status/error codes from the response, so string matching is the only viable assertion strategy for these tests. (You may still flag other issues, but not the string-based assertion fragility claim without acknowledging this constraint.)

Comment on lines +37 to +40
grpc.delete_cluster_catalog_item(catalog_item_id=catalog_item_id)
catalog_item_id = ""

assert catalog_item_id not in grpc.list_cluster_catalog_item_ids()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Deletion verification checks wrong value (always passes).

Line 38 sets catalog_item_id = "" immediately after deletion, then line 40 asserts that this empty string is not in the catalog item list. This assertion always passes regardless of whether deletion succeeded, because an empty string will never appear in the ID list.

Risk severity: Critical — The test cannot detect catalog item deletion failures, allowing broken delete operations to pass silently and accumulate leaked resources.

🐛 Proposed fix to verify actual catalog item ID
         grpc.delete_cluster_catalog_item(catalog_item_id=catalog_item_id)
+        deleted_id = catalog_item_id
         catalog_item_id = ""
 
-        assert catalog_item_id not in grpc.list_cluster_catalog_item_ids()
+        assert deleted_id not in grpc.list_cluster_catalog_item_ids()
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/catalog/test_catalog_item_lifecycle.py` around lines 37 - 40, The test
in test_catalog_item_lifecycle.py has a critical logic error where
catalog_item_id is set to an empty string on line 38 immediately after calling
grpc.delete_cluster_catalog_item(), and then line 40 asserts that this empty
string is not in the catalog item list. This assertion always passes regardless
of whether the deletion succeeded, because an empty string will never be in the
ID list. To fix this, move the assertion on line 40 to execute before line 38
reassigns catalog_item_id to an empty string, so the assertion actually verifies
that the original catalog_item_id value has been removed from the list returned
by grpc.list_cluster_catalog_item_ids().

Comment thread tests/catalog/test_catalog_item_lifecycle.py
@tzvatot tzvatot dismissed coderabbitai[bot]’s stale review June 16, 2026 11:27

nitpick, dismissing

@tzvatot

tzvatot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci

openshift-ci Bot commented Jun 17, 2026

Copy link
Copy Markdown

@tzvatot: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-vmaas 8c40aa0 link true /test e2e-vmaas

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants