Skip to content

Conversation

@UdeshyaDhungana
Copy link
Contributor

@UdeshyaDhungana UdeshyaDhungana commented Nov 4, 2025

  • Differentiate between bulk string and simple string types

    • Previously, tests were agnostic between SimpleString and BulkString
    • See test_get_set.go and string_assertion.go previously
    • Separated out the cases and replaced with exact type assertions.
  • Re-use DataTypeAssertion in tests.


Note

Enforces strict RESP type checks (bulk vs simple), introduces new assertion types, renames array string assertions to bulk-string variants, and updates tests and command handling to use DataTypeAssertion throughout.

  • Assertions:
    • Add BulkStringAssertion, RegexSimpleStringAssertion; replace generic StringAssertion (removed).
    • Rename array assertions: Ordered/UnorderedStringArrayAssertionOrdered/UnorderedBulkStringArrayAssertion.
    • Require bulk strings in CommandAssertion (command and args) and related checks.
    • Rework many assertions to reuse DataTypeAssertion; improve error messages with RESP null hints.
    • Switch regex/string checks to bulk/simple-specific variants (e.g., NewRegexBulkStringAssertion).
  • Tests/Usage:
    • Update all test cases to use new bulk/simple string assertions and renamed array assertions.
    • Use DataTypeAssertion directly where only type validation is needed (e.g., INFO replication, XADD auto-id).
    • Minor anti-cheat change to use bulk-string regex assertion.

Written by Cursor Bugbot for commit 6b91976. This will update automatically on new commits. Configure here.

@UdeshyaDhungana UdeshyaDhungana changed the title Data type assertion Data Type Assertion Nov 4, 2025
@UdeshyaDhungana UdeshyaDhungana merged commit af107fc into main Nov 6, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants