-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
ci: Add integration tests for Parse Server #224
ci: Add integration tests for Parse Server #224
Conversation
Thanks for opening this pull request! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up! The CI is failing, see https://github.com/parse-community/parse-server-s3-adapter/actions/runs/11315014989/job/31492994021?pr=224
I've left some comments below to simplify the test setup. It's also since we'll likely replicate this setup to other adapters in the future, so we'd want it as simple as possible.
I’ve addressed all the issues raised in the review and responded to the comments. I’ve also simplified the setup as much as possible, keeping future adapter replication in mind. I’m not exactly sure what’s going wrong with Istanbul—it’s been giving me random errors on my machine too. On Windows, I get the error: I tried switching from Istanbul to NYC locally, and it had no problems handling the Parse Server integration tests. Maybe we should consider switching to NYC and then fix the pipeline? Also, we need to collaborate on getting MongoDB to run automatically in the pipeline. I’ve added a command in package.json to run MongoDB using |
Sure, I'll try to open a separate PR to move to nyc, but it won't be before next week. Or do you want to do that and I look at mongorunner? |
Unfortunately, my schedule is getting busier, but I’ll try to create the PR over the weekend. That way, you can check out MongoRunner and the rest of the pipeline. |
@vahidalizad I've merged #225; could you update this PR and resolve the conflict? I'll then take a look at the mongo runner. |
I’ve updated the PR and resolved the conflicts. However, I believe we still need to fix the MongoDB runner. I’ve created a new command, |
I don't think there is a need to distinguish between integration test and other tests. Running I'll take a look at the mongo runner. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #224 +/- ##
==========================================
- Coverage 95.60% 95.28% -0.33%
==========================================
Files 2 2
Lines 205 191 -14
Branches 44 0 -44
==========================================
- Hits 196 182 -14
Misses 9 9 ☔ View full report in Codecov by Sentry. |
I've refactored the server integration; the CI passes, if we could remove the conformance tests as a last step, then I think we should be done, see discussion in #224 (comment). |
This reverts commit 6726c96.
I have removed the conformance tests because of several issues:
The CI now explicitly tests against Parse Server 6 and 7. The
In case the interface changes in newer Parse Server versions, it can have its own integration test group. |
@vahidalizad What do you think about the PR, is it ready to merge? |
Yes, I think we’re all set! Thanks for doing a great job with all the cleanup and everything else. Much appreciated! |
🎉 This change has been released in version 4.0.0 |
Summary
This PR introduces integration tests for the S3 adapter in Parse Server, leveraging MongoDB and
mongodb-runner
to ensure the adapter's functionality with file handling. Additionally, a new npm commandtest:integration
has been added to streamline the process of running these tests by automatically spinning up a MongoDB instance.It's important to note that without running the tests using
test:integration
, some integration tests may fail due to the absence of a MongoDB instance. This might require minor adjustments to the pipelines to incorporate this new command.I also considered removing the use of the
config
dependency in this setup, as it adds no significant value; the environment is strictly for testing in this repo, and we could simply pass it as an object. However, I haven’t implemented this change yet in this PR.Closes: #222
Changes
mongodb-runner
to handle MongoDB instances during the test process.test:integration
to run integration tests with MongoDB automatically.test:integration
.Suggestion
Since we are making updates to the testing pipelines, I suggest we also replace the istanbul dependency with nyc for cleaner coverage reporting and to update our dependencies. I haven’t made this change in this PR, but it's a simple update that could improve maintainability.