Skip to content
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

Add tests to findAndModify on $exists operator #2422

Merged
merged 16 commits into from
Apr 19, 2023

Conversation

chilagrow
Copy link
Member

@chilagrow chilagrow commented Apr 13, 2023

Description

Closes #2400.
Closes #1098.

Readiness checklist

  • I added/updated unit tests.
  • I added/updated integration/compatibility tests.
  • I added/updated comments and checked rendering.
  • I made spot refactorings.
  • I updated user documentation.
  • I ran task all, and it passed.
  • I ensured that PR title is good enough for the changelog.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@chilagrow chilagrow added the code/chore Code maintenance improvements label Apr 13, 2023
@chilagrow chilagrow self-assigned this Apr 13, 2023
@codecov
Copy link

codecov bot commented Apr 13, 2023

Codecov Report

Merging #2422 (177ebc9) into main (4404e49) will decrease coverage by 37.64%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2422       +/-   ##
===========================================
- Coverage   64.31%   26.67%   -37.64%     
===========================================
  Files         397      397               
  Lines       19557    19566        +9     
===========================================
- Hits        12578     5220     -7358     
- Misses       6066    13788     +7722     
+ Partials      913      558      -355     
Impacted Files Coverage Δ
internal/handlers/common/findandmodify.go 0.00% <0.00%> (-88.43%) ⬇️
internal/handlers/common/update.go 0.00% <0.00%> (-87.30%) ⬇️
internal/handlers/pg/msg_findandmodify.go 0.00% <0.00%> (-76.88%) ⬇️
internal/handlers/pg/msg_update.go 0.00% <0.00%> (-55.56%) ⬇️
internal/handlers/tigris/msg_findandmodify.go 0.00% <0.00%> (ø)
internal/handlers/tigris/msg_update.go 0.00% <0.00%> (ø)

... and 123 files with indirect coverage changes

Flag Coverage Δ
integration 5.03% <0.00%> (-52.43%) ⬇️
mongodb 5.03% <0.00%> (-0.01%) ⬇️
pg ?
unit 25.30% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@chilagrow chilagrow requested review from a team, w84thesun, rumyantseva and noisersup April 17, 2023 03:54
@chilagrow chilagrow marked this pull request as ready for review April 17, 2023 03:54
@chilagrow chilagrow requested a review from a team as a code owner April 17, 2023 03:54
@chilagrow chilagrow requested a review from AlekSi April 17, 2023 03:54
@chilagrow chilagrow enabled auto-merge (squash) April 17, 2023 03:55
@AlekSi AlekSi removed their request for review April 17, 2023 08:56
@AlekSi AlekSi added this to the v1.1.0 milestone Apr 17, 2023
Copy link
Member

@AlekSi AlekSi left a comment

Choose a reason for hiding this comment

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

It seems that this PR also fixes related bugs. If so, the title, body (Closes #xxx), and labels should indicate that

Copy link
Contributor

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

Such useful refactoring and nice tests!

Looks good to me overall, asked a couple of questions.

integration/findandmodify_compat_test.go Outdated Show resolved Hide resolved
integration/findandmodify_compat_test.go Outdated Show resolved Hide resolved
@chilagrow chilagrow requested review from rumyantseva and AlekSi April 18, 2023 03:25
Copy link
Contributor

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@w84thesun w84thesun left a comment

Choose a reason for hiding this comment

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

LGTM!

@chilagrow chilagrow added no ci and removed no ci labels Apr 19, 2023
@chilagrow chilagrow merged commit 6be6685 into FerretDB:main Apr 19, 2023
fenogentov pushed a commit to fenogentov/FerretDB that referenced this pull request Apr 20, 2023
fenogentov pushed a commit to fenogentov/FerretDB that referenced this pull request Apr 20, 2023
fenogentov pushed a commit to fenogentov/FerretDB that referenced this pull request Apr 20, 2023
fenogentov pushed a commit to fenogentov/FerretDB that referenced this pull request Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Test more $exists cases in findAndModify upsert: the response from FerretDB is not the same as from proxy
5 participants