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

Setup Tigris test cases with explicit schemas #1167

Merged

Conversation

rumyantseva
Copy link
Member

@rumyantseva rumyantseva commented Sep 20, 2022

Description

Refs #906. As we support JSON Schema validators for Tigris, in tests let's create collections by defining them explicitly.
This PR is preparation for #1005.

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.

@vercel
Copy link

vercel bot commented Sep 20, 2022

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

Name Status Preview Updated
ferret-db ✅ Ready (Inspect) Visit Preview Sep 28, 2022 at 8:30AM (UTC)

@rumyantseva rumyantseva changed the title Setup Tigris test cases with proper validation Setup Tigris test cases with proper schema Sep 20, 2022
@vercel vercel bot temporarily deployed to Preview September 20, 2022 15:28 Inactive
@rumyantseva rumyantseva self-assigned this Sep 20, 2022
@rumyantseva rumyantseva added the code/chore Code maintenance improvements label Sep 20, 2022
@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

Merging #1167 (b31497e) into main (c2fba8e) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1167      +/-   ##
==========================================
- Coverage   66.38%   66.33%   -0.06%     
==========================================
  Files         250      251       +1     
  Lines       12256    12293      +37     
==========================================
+ Hits         8136     8154      +18     
- Misses       3232     3248      +16     
- Partials      888      891       +3     
Impacted Files Coverage Δ
integration/setup/setup.go 87.25% <100.00%> (+0.79%) ⬆️
integration/setup/setup_compat.go 88.39% <100.00%> (+0.77%) ⬆️
integration/shareddata/scalars.go 100.00% <100.00%> (ø)
integration/shareddata/shareddata.go 85.33% <100.00%> (+2.25%) ⬆️
internal/tjson/schema.go 77.62% <100.00%> (+0.64%) ⬆️
internal/util/version/version.go 55.00% <0.00%> (-5.00%) ⬇️
internal/handlers/pg/pgdb/settings.go 39.53% <0.00%> (-4.66%) ⬇️
internal/handlers/pg/pgdb/query.go 40.68% <0.00%> (-2.76%) ⬇️
internal/handlers/common/filter.go 86.58% <0.00%> (-0.95%) ⬇️
internal/handlers/tigris/json_schema.go 100.00% <0.00%> (+15.78%) ⬆️
Flag Coverage Δ
integration 62.62% <100.00%> (-0.01%) ⬇️
mongodb 14.89% <37.83%> (+0.04%) ⬆️
pg 51.86% <40.54%> (-0.19%) ⬇️
tigris 34.67% <94.59%> (+0.18%) ⬆️
unit 24.00% <25.00%> (-0.06%) ⬇️

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

@vercel vercel bot temporarily deployed to Preview September 20, 2022 17:07 Inactive
@vercel vercel bot temporarily deployed to Preview September 20, 2022 20:48 Inactive
@vercel vercel bot temporarily deployed to Preview September 20, 2022 20:51 Inactive
@vercel vercel bot temporarily deployed to Preview September 22, 2022 10:12 Inactive
@rumyantseva rumyantseva changed the title Setup Tigris test cases with proper schema Setup Tigris test cases with explicit schemas Sep 22, 2022
@vercel vercel bot temporarily deployed to Preview September 22, 2022 10:13 Inactive
@rumyantseva rumyantseva requested review from a team, AlekSi, w84thesun and noisersup and removed request for a team September 22, 2022 10:13
@rumyantseva rumyantseva marked this pull request as ready for review September 22, 2022 10:13
@rumyantseva rumyantseva requested a review from a team as a code owner September 22, 2022 10:14
@vercel vercel bot temporarily deployed to Preview September 22, 2022 18:01 Inactive
@vercel vercel bot temporarily deployed to Preview September 26, 2022 09:55 Inactive
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.

Overall LGTM,
I pointed one more place where we should declare the variable in place of initialization

integration/setup/setup_compat.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview September 27, 2022 09:29 Inactive
@vercel vercel bot temporarily deployed to Preview September 27, 2022 12:29 Inactive
@vercel vercel bot temporarily deployed to Preview September 27, 2022 12:40 Inactive
@vercel vercel bot temporarily deployed to Preview September 27, 2022 15:52 Inactive
@vercel vercel bot temporarily deployed to Preview September 28, 2022 08:26 Inactive
@vercel vercel bot temporarily deployed to Preview September 28, 2022 08:29 Inactive
@rumyantseva rumyantseva enabled auto-merge (squash) September 28, 2022 08:30
@vercel vercel bot temporarily deployed to Preview September 28, 2022 08:31 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.

LGTM

@AlekSi AlekSi linked an issue Sep 28, 2022 that may be closed by this pull request
9 tasks
@rumyantseva rumyantseva enabled auto-merge (squash) September 28, 2022 11:08
@rumyantseva rumyantseva merged commit 91186e7 into FerretDB:main Sep 28, 2022
@rumyantseva rumyantseva deleted the tigris-setup-tests-with-validation branch September 28, 2022 12:56
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.

LGTM

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.

tjson: Support null
4 participants