-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
do not return payload as field #1914
Conversation
MeirShpilraien
commented
Mar 20, 2021
•
edited by ashtul
Loading
edited by ashtul
- cherry pick to 2.0
Tests will pass when this will be merged: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests are for the payload.
@@ -207,10 +207,10 @@ def testPayload(env): | |||
for _ in env.retry_with_rdb_reload(): | |||
waitForIndex(env, 'things') | |||
res = env.cmd('ft.search', 'things', 'foo') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add 'WITHPAYLOAD`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is withpayloads right below..
@@ -207,10 +207,10 @@ def testPayload(env): | |||
for _ in env.retry_with_rdb_reload(): | |||
waitForIndex(env, 'things') | |||
res = env.cmd('ft.search', 'things', 'foo') | |||
env.assertEqual(toSortedFlatList(res), toSortedFlatList([1L, 'thing:foo', ['name', 'foo', 'payload', 'stuff']])) | |||
env.assertEqual(toSortedFlatList(res), toSortedFlatList([1L, 'thing:foo', ['name', 'foo']])) | |||
|
|||
res = env.cmd('ft.search', 'things', 'foo', 'withpayloads') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is withpayloads
@@ -223,10 +223,10 @@ def testBinaryPayload(env): | |||
for _ in env.retry_with_rdb_reload(): | |||
waitForIndex(env, 'things') | |||
res = env.cmd('ft.search', 'things', 'foo') | |||
env.assertEqual(toSortedFlatList(res), toSortedFlatList([1L, 'thing:foo', ['name', 'foo', 'payload', '\x00\xAB\x20']])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
|
||
res = env.cmd('ft.search', 'things', 'foo', 'withpayloads') | ||
env.assertEqual(toSortedFlatList(res), toSortedFlatList([1L, 'thing:foo', '\x00\xAB\x20', ['name', 'foo', 'payload', '\x00\xAB\x20']])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
Codecov Report
@@ Coverage Diff @@
## master #1914 +/- ##
=======================================
Coverage 80.30% 80.30%
=======================================
Files 148 148
Lines 21503 21504 +1
=======================================
+ Hits 17268 17269 +1
Misses 4235 4235
Continue to review full report at Codecov.
|
LGTM 👍🏻 |
* do not return payload as field * fix tests * fix tests * fix tests * fix tests Co-authored-by: Rafi Einstein <[email protected]>
* do not return payload as field * fix tests * fix tests * fix tests * fix tests Co-authored-by: Rafi Einstein <[email protected]> Co-authored-by: Rafi Einstein <[email protected]>