Skip to content

ci: enable more tests on Postgres adapter #7641

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

Merged
merged 17 commits into from
Oct 18, 2021
Merged

ci: enable more tests on Postgres adapter #7641

merged 17 commits into from
Oct 18, 2021

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Oct 18, 2021

New Pull Request Checklist

Issue Description

A number of test cases are not enabled for the PostgresAdapter though the adapter is able to pass the tests. This can be for a number of reasons such as:

  • functionality was implemented when tests was originally created, but adapter now has functionality
  • by mistake or oversight

Most of the other tests that can't pass are either legacy tests from the original Parse Server, from legacy versions of the servers, or tests that use specific mongo functionality.

In addition, some tests are incorrectly labeled to be excluded from postgres, while they specifically should say they should only run on mongo.

Close #7640

Related issue: #7640

Approach

Enable 17+ tests that are able to pass. Modify certain tests designed for mongo to run on both adapters.

With the changes, Postgres runs 2672 of the tests compared to Mongo running 2808 tests, meaning Postgres runs >95% of the tests Mongo runs in the test suite. Another way to look at this is the total amount of tests is 2876. Postgres passes 93% of the test suite while Mongo passes 98%.

TODOs before merging

  • Add test cases
  • Squashed 2 bugs that caused CI to randomly fail in ParsePolygon due to not waiting for async call to finish before tests began:

beforeEach(() => require('../lib/TestUtils').destroyAllDataPermanently());

beforeEach(() => require('../lib/TestUtils').destroyAllDataPermanently());

@parse-github-assistant
Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title ci: Enable more tests on Postgres adapter ci: enable more tests on Postgres adapter Oct 18, 2021
@parse-github-assistant
Copy link

parse-github-assistant bot commented Oct 18, 2021

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented Oct 18, 2021

Codecov Report

Merging #7641 (6a8f985) into master (80bf578) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7641   +/-   ##
=======================================
  Coverage   93.98%   93.98%           
=======================================
  Files         181      181           
  Lines       13354    13354           
=======================================
  Hits        12551    12551           
  Misses        803      803           
Impacted Files Coverage Δ
src/ParseServerRESTController.js 97.01% <0.00%> (-1.50%) ⬇️
src/Adapters/Files/GridFSBucketAdapter.js 80.32% <0.00%> (+0.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80bf578...6a8f985. Read the comment docs.

@cbaker6
Copy link
Contributor Author

cbaker6 commented Oct 18, 2021

Finished updates, this is ready for review

@cbaker6 cbaker6 closed this Oct 18, 2021
@cbaker6 cbaker6 reopened this Oct 18, 2021
@cbaker6 cbaker6 requested a review from mtrezza October 18, 2021 14:32
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Looks good! The Postgres adapter is catching up!

@mtrezza mtrezza merged commit b5fc0d5 into parse-community:master Oct 18, 2021
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.0.0-alpha.2

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Oct 27, 2021
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.0.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Nov 1, 2021
@cbaker6 cbaker6 deleted the enableTests branch November 22, 2021 18:42
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.0.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable current disabled tests on Postgres
3 participants