parse-server
parse-server copied to clipboard
ci: Add test support for external database adapter
Pull Request
- Report security issues confidentially.
- Any contribution is under this license.
- Link this pull request to an issue.
Issue
Closes: https://github.com/parse-community/parse-server/issues/8788
Approach
Add support to dynamically import an external database adapter to run tests.
Tasks
n/a
Thanks for opening this pull request!
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 93.79%. Comparing base (
f1469c6
) to head (f6f317b
). Report is 8 commits behind head on alpha.
Additional details and impacted files
@@ Coverage Diff @@
## alpha #8883 +/- ##
==========================================
- Coverage 94.13% 93.79% -0.35%
==========================================
Files 186 186
Lines 14687 14724 +37
==========================================
- Hits 13826 13810 -16
- Misses 861 914 +53
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@ddrechse Since I guess we cannot easily add a test for this; do you have an example that shows that this works?
I do I have added the adapter support to the repo here https://github.com/oracle-samples/oracleadapter-parse
This is an example config.json for the Oracle Storage Adapter running against Free23c locally
{
"appId": "APPLICATION_ID",
"masterKey": "MASTER_KEY",
"port": 1338,
"logLevel": "info",
"verbose": false,
"mountGraphQL": true,
"mountPlayground": true,
"graphQLPath": "/graphql",
"filesAdapter": {
"module": "@parse/fs-files-adapter"
},
"databaseAdapter": {
"module": "../Adapters/Storage/Oracle/OracleStorageAdapter",
"options": {
"databaseURI": "oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1",
"collectionPrefix": ""
}
}
}
@mtrezza
Could you test this out by using the branch of this PR in https://github.com/parse-community/parse-server-database-adapter-template/pull/4? Looking at the CI there, it's using a Parse Server version tag when installing Parse Server, so it doesn't have the feature of this PR yet and the CI there actually runs with the MongoDB storage adapter, right? If you could change it to use the branch of this PR, then passing the env vars in the CI should run the CI with Oracle DB adapter, and once we see that works, we can merge this PR, does that make sense?
Yes it does
@mtrezza @ddrechse is this ready to merge? I have a MySQL adapter that can use this. MySQL and PostgreSQL are similar so moving PG to another repo would be easier
@dplewis this is still ongoing development, partly outside of this org. Once we know it all works, we will merge and publish a repo template that you can use for your SQL adapter.
🎉 This change has been released in version 7.1.0-alpha.7
🎉 This change has been released in version 7.1.0-beta.1
🎉 This change has been released in version 7.1.0