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

Remove duplicated $expr tests #3255

Merged
merged 2 commits into from
Aug 28, 2023
Merged

Conversation

chilagrow
Copy link
Member

@chilagrow chilagrow commented Aug 28, 2023

Description

Compat tests and integration tests for $expr in $match stage behaves exactly like find command with $expr. Let's remove duplicated tests, they are covered by https://github.com/FerretDB/FerretDB/blob/main/integration/query_evaluation_compat_test.go#L308 and https://github.com/FerretDB/FerretDB/blob/main/integration/query_evaluation_test.go#L93

We do not want unnecessary tests which slows down our integration tests, see #3163 (comment)

Readiness checklist

  • I added/updated unit tests (and they pass).
  • I added/updated integration/compatibility tests (and they pass).
  • 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), Milestone (Next), 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 Aug 28, 2023
@chilagrow chilagrow self-assigned this Aug 28, 2023
@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Merging #3255 (4679c00) into main (a71936d) will decrease coverage by 0.11%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3255      +/-   ##
==========================================
- Coverage   75.26%   75.16%   -0.11%     
==========================================
  Files         400      400              
  Lines       22386    22386              
==========================================
- Hits        16849    16826      -23     
- Misses       4563     4582      +19     
- Partials      974      978       +4     

see 7 files with indirect coverage changes

Flag Coverage Δ
hana ?
integration 71.59% <ø> (-0.11%) ⬇️
mongodb 5.25% <ø> (ø)
pg 64.65% <ø> (-0.10%) ⬇️
shard-1 55.93% <ø> (-0.81%) ⬇️
shard-2 54.68% <ø> (-1.60%) ⬇️
shard-3 55.92% <ø> (+0.99%) ⬆️
sqlite 46.99% <ø> (-0.05%) ⬇️
unit 24.49% <ø> (-0.02%) ⬇️

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

"github.com/FerretDB/FerretDB/integration/shareddata"
)

func TestAggregateMatchExprErrors(tt *testing.T) {
Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -29,124 +29,11 @@ func TestAggregateCompatMatchExpr(t *testing.T) {
bson.D{{"$match", bson.D{{"$expr", "$v"}}}},
},
},
"ExpressionDotNotation": {
Copy link
Member Author

Choose a reason for hiding this comment

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

@chilagrow chilagrow added this to the Next milestone Aug 28, 2023
@chilagrow chilagrow marked this pull request as ready for review August 28, 2023 07:40
@chilagrow chilagrow requested a review from a team as a code owner August 28, 2023 07:40
@chilagrow chilagrow requested review from AlekSi, rumyantseva, a team and noisersup August 28, 2023 07:40
@chilagrow chilagrow enabled auto-merge (squash) August 28, 2023 07:40
@AlekSi AlekSi modified the milestones: v1.9.0, Next Aug 28, 2023
Copy link
Member

@noisersup noisersup left a comment

Choose a reason for hiding this comment

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

Nice finding!

@AlekSi AlekSi disabled auto-merge August 28, 2023 11:51
@AlekSi AlekSi merged commit 7457c98 into FerretDB:main Aug 28, 2023
yonarw pushed a commit to yonarw/FerretDB that referenced this pull request Aug 31, 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.

3 participants