Repository navigation
Fix: go restful api tests - #17247
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughMemory name validation now rejects whitespace-only input, reports updated errors, classifies additional validation failures as argument errors, and enables related REST tests for Go proxy runs with updated payload identifiers. ChangesMemory name validation
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@test/testcases/restful_api/conftest.py`:
- Line 68: Remove the commented-out "test_memory_update_invalid_name" entry from
the skip-list configuration in conftest.py, leaving active entries unchanged.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b8302799-376e-4d75-8903-333e2e8c36c4
📒 Files selected for processing (4)
internal/common/app_name.gointernal/handler/memory.gotest/testcases/restful_api/conftest.pytest/testcases/restful_api/test_memory_messages.py
…w into fix/go-restful-api-tests
wangq8
left a comment
There was a problem hiding this comment.
Overall looks good — the TrimSpace change in CreateMemory correctly aligns Go with Python behavior, and the added argument error prefixes ensure proper error code classification.
A few notes:
-
conftest.py: Commenting out tests with
#instead of using@pytest.mark.skip(reason="...")makes them invisible to the test runner. Consider using@pytest.mark.skipor@pytest.mark.xfailso they still appear in the test report as skipped rather than silently vanishing. -
Model IDs in tests: The change from
@Builtin→@Local@Builtinand@ZHIPU-AI→@CI@ZHIPU-AIassumesLocalandCIinstance names exist in all test environments. Are these always present, or could this break CI/Docker test setups? -
isArgumentError: The new prefix
"name length is"is intentionally broad — it will match any name-length error. Is this prefix also used by ValidateName? I see the error format is"name length is %d which is large than %d"— which contains a typo in "large" (should be "larger"). Not introduced by this PR, but worth a follow-up fix.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17247 +/- ##
==========================================
- Coverage 94.56% 90.65% -3.91%
==========================================
Files 10 10
Lines 717 717
Branches 118 118
==========================================
- Hits 678 650 -28
- Misses 25 39 +14
- Partials 14 28 +14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Align
create_memorygo api to python api.