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

Move query tests to compat by comparing the error code instead of the error message #1579

Merged
merged 18 commits into from
Nov 30, 2022

Conversation

chilagrow
Copy link
Contributor

@chilagrow chilagrow commented Nov 28, 2022

Description

Closes #1450.

Readiness checklist

  • I added tests for new functionality or bugfixes.
  • I ran task all, and it passed.
  • I added/updated comments for both exported and unexported top-level declarations (functions, types, etc).
  • I checked comments rendering with task godocs.
  • I ensured that the 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 self-assigned this Nov 28, 2022
@vercel
Copy link

vercel bot commented Nov 28, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ferret-db ✅ Ready (Inspect) Visit Preview Nov 29, 2022 at 4:24PM (UTC)

@chilagrow chilagrow added the code/chore Code maintenance improvements label Nov 28, 2022
@vercel vercel bot temporarily deployed to Preview November 28, 2022 07:34 Inactive
@vercel vercel bot temporarily deployed to Preview November 28, 2022 07:46 Inactive
@chilagrow chilagrow changed the title Unmoved query compat tests Move query tests to compat which has the same error code but not the exact message Nov 28, 2022
@chilagrow chilagrow changed the title Move query tests to compat which has the same error code but not the exact message Move query tests to compat by comparing the error code instead of the error message Nov 28, 2022
@codecov
Copy link

codecov bot commented Nov 28, 2022

Codecov Report

Merging #1579 (08ef7f4) into main (05fa28a) will decrease coverage by 0.00%.
The diff coverage is 57.14%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1579      +/-   ##
==========================================
- Coverage   67.68%   67.67%   -0.01%     
==========================================
  Files         284      284              
  Lines       13800    13813      +13     
==========================================
+ Hits         9340     9348       +8     
- Misses       3502     3505       +3     
- Partials      958      960       +2     
Impacted Files Coverage Δ
integration/helpers.go 85.50% <53.84%> (-2.13%) ⬇️
internal/handlers/common/filter.go 84.56% <100.00%> (ø)
internal/util/version/version.go 48.52% <0.00%> (-4.42%) ⬇️
internal/handlers/common/projection.go 64.54% <0.00%> (+1.21%) ⬆️
Flag Coverage Δ
integration 63.60% <57.14%> (-0.01%) ⬇️
mongodb 13.88% <0.00%> (-0.04%) ⬇️
pg 52.34% <57.14%> (-0.02%) ⬇️
tigris 36.90% <57.14%> (+0.12%) ⬆️
unit 26.79% <0.00%> (-0.03%) ⬇️

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 and removed request for a team November 28, 2022 07:57
@chilagrow chilagrow marked this pull request as ready for review November 28, 2022 07:57
@chilagrow chilagrow requested a review from a team as a code owner November 28, 2022 07:57
@chilagrow chilagrow enabled auto-merge (squash) November 28, 2022 07:57
@vercel vercel bot temporarily deployed to Preview November 28, 2022 07:59 Inactive
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.

We should also compare errors's Name field, and maybe Wrapped

@vercel vercel bot temporarily deployed to Preview November 28, 2022 08:13 Inactive
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.

Overall good, one comment about AssertEqualErrorCode.

integration/helpers.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview November 28, 2022 13:44 Inactive
Copy link
Member

@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 overall, nothing else than what Dmitry found.

integration/query_compat_test.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview November 28, 2022 17:58 Inactive
@vercel vercel bot temporarily deployed to Preview November 28, 2022 18:29 Inactive
@vercel vercel bot temporarily deployed to Preview November 29, 2022 01:10 Inactive
@vercel vercel bot temporarily deployed to Preview November 29, 2022 02:05 Inactive
rumyantseva
rumyantseva previously approved these changes Nov 29, 2022
Copy link
Member

@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

@vercel vercel bot temporarily deployed to Preview November 29, 2022 08:37 Inactive
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.

(cursory review)

integration/helpers.go Outdated Show resolved Hide resolved
integration/query_compat_test.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview November 29, 2022 16:24 Inactive
Copy link
Member

@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

@chilagrow chilagrow merged commit 3cdd0be into FerretDB:main Nov 30, 2022
@AlekSi AlekSi added this to the v0.7.0 milestone Dec 5, 2022
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
None yet
Development

Successfully merging this pull request may close these issues.

Move more query tests to compat tests
4 participants