Skip to content

[TST]: add basic tests for where parsing #3593

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

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Conversation

codetheweb
Copy link
Contributor

@codetheweb codetheweb commented Jan 29, 2025

Description of changes

Adds some basic tests for where document and where clause parsing.

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?

n/a

Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copy link
Contributor Author

codetheweb commented Jan 29, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@@ -52,7 +52,7 @@ pub fn parse_where_document(json_payload: &Value) -> Result<Where, ValidationErr
let operator_type;
if key == "$contains" {
operator_type = DocumentOperator::Contains;
} else if key == "not_contains" {
} else if key == "$not_contains" {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found a bug :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@codetheweb codetheweb marked this pull request as ready for review January 29, 2025 02:40
@codetheweb codetheweb force-pushed the cln-split-off-where-parsing branch from 374573b to f1b5391 Compare January 29, 2025 02:43
@codetheweb codetheweb force-pushed the cln-split-off-where-parsing branch from f1b5391 to 6079402 Compare January 29, 2025 23:40
Copy link
Contributor Author

codetheweb commented Jan 30, 2025

Merge activity

  • Jan 29, 7:36 PM EST: A user started a stack merge that includes this pull request via Graphite.
  • Jan 29, 7:38 PM EST: Graphite rebased this pull request as part of a merge.
  • Jan 29, 8:25 PM EST: A user merged this pull request with Graphite.

@codetheweb codetheweb changed the base branch from cln-split-off-where-parsing to graphite-base/3593 January 30, 2025 00:36
@codetheweb codetheweb changed the base branch from graphite-base/3593 to main January 30, 2025 00:36
@codetheweb codetheweb merged commit 6a3c591 into main Jan 30, 2025
91 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.

2 participants