Repository navigation
test(string): cover GETDEL nil, empty value and wrong type cases - #3782
Merged
aleksraiden merged 2 commits intoNov 13, 2026
Merged
Conversation
|
Hi @zbyyehyehyeh, Thank you for your pull request. Please review our Contributing Guide. Please make sure you understand your changes and explain your reasoning in this pull request. Low-quality pull requests may be closed. |
Contributor
Author
|
Responding to the checklist above.
|
6 of 13 tasks
aleksraiden
approved these changes
Nov 13, 2026
aleksraiden
enabled auto-merge (squash)
November 13, 2026 07:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GETDELis currently covered by a single case that uses.Val(), andgo-redis returns an empty string for both a missing key and an empty value,
so the two behaviours are not distinguished.
This adds coverage for:
and must delete the key;
WRONGTYPE.All assertions pass against
unstablelocally:AI assistance
Produced with qwen3.7max. I reviewed every line and ran the tests locally.
Why this matters
This is a test-only change with no behaviour change in
src/. The existingcase cannot tell a missing key apart from an empty value, because go-redis
collapses both into
"", so a regression inGETDELhandling of either pathwould go unnoticed. The new assertions use
Result()/Exists()so the twooutcomes are actually distinguishable, and cover the TTL and wrong-type paths
that were previously untested.