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 more handler tests #2769

Merged
merged 14 commits into from Jun 5, 2023
Merged

Conversation

w84thesun
Copy link
Contributor

@w84thesun w84thesun commented Jun 1, 2023

Description

Closes #2704.

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), Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@w84thesun w84thesun self-assigned this Jun 1, 2023
@w84thesun w84thesun added the code/chore Code maintenance improvements label Jun 1, 2023
@w84thesun w84thesun added this to the Next milestone Jun 1, 2023
@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Merging #2769 (fc85f77) into main (8c818a4) will decrease coverage by 36.85%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2769       +/-   ##
===========================================
- Coverage   62.90%   26.06%   -36.85%     
===========================================
  Files         441      441               
  Lines       22727    22737       +10     
===========================================
- Hits        14297     5926     -8371     
- Misses       7499    16201     +8702     
+ Partials      931      610      -321     
Impacted Files Coverage Δ
internal/handlers/common/setfreemonitoring.go 0.00% <0.00%> (-65.39%) ⬇️
internal/handlers/pg/msg_datasize.go 0.00% <0.00%> (-67.86%) ⬇️

... and 142 files with indirect coverage changes

Flag Coverage Δ
integration 4.94% <0.00%> (-51.45%) ⬇️
mongodb 4.94% <0.00%> (-0.01%) ⬇️
pg ?
unit 24.53% <0.00%> (-0.06%) ⬇️

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

@w84thesun w84thesun marked this pull request as ready for review June 1, 2023 19:29
@w84thesun w84thesun requested a review from a team as a code owner June 1, 2023 19:29
@w84thesun w84thesun enabled auto-merge (squash) June 1, 2023 19:30
@w84thesun w84thesun requested review from a team, rumyantseva and noisersup June 1, 2023 19:30
Copy link
Contributor

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

Some comments 🤗

integration/commands_freemonitoring_test.go Show resolved Hide resolved
internal/handlers/pg/msg_datasize.go Outdated Show resolved Hide resolved
internal/handlers/pg/msg_datasize.go Outdated Show resolved Hide resolved
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.

I agree with Chi, it seems that errors returned because of invalid params should be tested and shouldn't be lazyerrors (even if they were before). But I like that we added more tests to check params!

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.

LGTM

Copy link
Contributor

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

Nice addition of tests!

integration/commands_freemonitoring_test.go Show resolved Hide resolved
@w84thesun w84thesun merged commit a2a4ddb into FerretDB:main Jun 5, 2023
22 of 25 checks passed
@w84thesun w84thesun deleted the more-handlers-tests branch June 5, 2023 00:32
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.

Analyse the way we process parameters in handlers
4 participants