test: add new test for no assetType#1364
Conversation
Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com> Co-Authored-By: Claude <noreply@anthropic.com>
|
The following are automatically added/executed:
Available user actions:
Supported labels{'/wip', '/cherry-pick', '/hold', '/lgtm', '/verified', '/build-push-pr-image'} |
📝 WalkthroughWalkthroughA new test function validates the default behavior of the labels API endpoint when invoked without an Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/model_registry/model_catalog/metadata/test_labels_endpoint.py`:
- Around line 57-63: The test currently only checks non-empty api_labels and
assetType values which can miss regressions; update the test to call the labels
endpoint twice — once with no params (api_labels) and once with the explicit
query asset_type="models" (e.g., api_labels_models) — then assert that the two
responses are equivalent by invoking the existing verify_labels_match helper to
compare them, replacing the mismatches list/assert; ensure you still assert
non-empty and that verify_labels_match is used for consistency.
🪄 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 YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 6dbc120f-a6e4-4af8-b663-e8c3934f447b
📒 Files selected for processing (1)
tests/model_registry/model_catalog/metadata/test_labels_endpoint.py
|
Status of building tag latest: success. |
Pull Request
Summary
Related Issues
Please review and indicate how it has been tested
Additional Requirements
Summary by CodeRabbit