-
Notifications
You must be signed in to change notification settings - Fork 990
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
chore(fakeredis): Enable JSON tests in the Fakeredis tests #3773
chore(fakeredis): Enable JSON tests in the Fakeredis tests #3773
Conversation
927b591
to
184f3ce
Compare
Can you please add a unit test for |
Good work! |
6991832
to
8a7d31c
Compare
Due to the fact that for The problem is mentioned in the #3777 issue. When it will be fixed, we will be able to check the error message in the tests. |
} | ||
} | ||
|
||
std::optional<JsonPathType> path_type; |
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.
I see that all this values has const default values
kDefaultOnEmpty
and kDefaultJsonPathType
so why do we need to use std::optional?
std::optional<JsonPathType> path_type = std::nullopt; | ||
SavingOrder saving_order{SavingOrder::kSaveLast}; | ||
OnEmpty on_empty{OnEmpty::kSendWrongType}; | ||
void InitializeEmptyOptions(JsonPathType default_path_type, OnEmpty default_on_empty) { |
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.
I find this confusing
calling this function will initialize the values if they are not already initialized?
So do we have flows when we call this function twice with different values and only the first call should set the values?
fixes dragonflydb#3671 Signed-off-by: Stsiapan Bahrytsevich <[email protected]>
Signed-off-by: Stsiapan Bahrytsevich <[email protected]>
Signed-off-by: Stsiapan Bahrytsevich <[email protected]>
Signed-off-by: Stsiapan Bahrytsevich <[email protected]>
8a7d31c
to
ea6a3db
Compare
fixes #3671
JSON.ARRINDEX
command. It should return error for the empty result in the legacy modetest_json_arr_commands.py::test_arrindex