test(runtime): convert virtualmodels, streaming, ratelimit, and workflow tests to testify - #980
test(runtime): convert virtualmodels, streaming, ratelimit, and workflow tests to testify#980SantiagoDePolonia wants to merge 4 commits into
Conversation
…low tests to testify
|
Warning Review limit reachedNext included review available in 11 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (66)
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 |
|
| assert.NotNil(t, chat.MaxTokens) | ||
| assert.Equal(t, 256, *chat.MaxTokens) |
There was a problem hiding this comment.
assert.NotNil records a failure but continues, and the next line unconditionally dereferences chat.MaxTokens. If request conversion returns a nil value, this test reports the intended assertion failure and then panics, obscuring the regression with a less useful stack trace. This is non-blocking, but use require.NotNil here or conditionally perform the dereference after assert.NotNil succeeds.
Artifacts
- Runs a temporary focused Go test with the same Testify assert-then-dereference sequence and removes the temporary source file afterward, demonstrating the nil path.
- Runs the existing TestToChatRequestBasic test and shows it passes with the valid max_tokens input, establishing the current normal-path behavior.
Error trace from the failing run
- Runs the authored nil-path reproduction and shows Testify's non-fatal NotNil failure followed by a nil-pointer SIGSEGV on the next line, confirming the finding.
…ropicapi request tests
|
Addressed the Greptile finding in b2cf52b: |
Converts the hand-rolled assertions in the
virtualmodels,streaming,ratelimit,workflows,anthropicapi,mcpgateway,budget, andgatewaytests to testify.globalVersionV1(features)in the workflow service tests, replacing twelve identicalVersionliterals.equalStrings,formatCandidates).Test-only change, about 2,800 net lines removed. Stacked on #976 (helper packages).