-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Fixed issue that prevented Postgres Tests from passing locally and on any port other than 5432 in travis #6531
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
Changes from all commits
Commits
Show all changes
112 commits
Select commit
Hold shift + click to select a range
841768c
Attempting to fix Postgres issue
cbaker6 33da65e
Attempting to fix Postgres issue
cbaker6 43b714d
Attempting to fix Postgres
cbaker6 8010633
Attempting to fix Postgres issue
cbaker6 cc2506a
Attempting to fix postgres
cbaker6 05181a7
Attempting to fix postgres
cbaker6 1ff769d
Attempting to fix postgres
cbaker6 fba1b83
Attempting to fix postgres
cbaker6 edf60e8
Attempting to fix postgres
cbaker6 c884e5d
Attempting to fix postgres
cbaker6 e553200
Attempting to fix postgres
cbaker6 c7b4411
Attempting to fix postgres
cbaker6 063dd2f
Attempting to fix postgres
cbaker6 d357a47
Attempting to fix postgres
cbaker6 b048966
Attempting to fix postgres
cbaker6 299b91d
Attempting to fix postgres
cbaker6 6adf026
Attempting to fix postgres
cbaker6 87e37a1
Attempting to fix postgres
cbaker6 c20a82e
Attempting to fix postgres
cbaker6 76a29d0
Attempting to fix postgres
cbaker6 b90abc4
Update .travis.yml
cbaker6 5d4019d
Attempting to fix postgres
cbaker6 028daee
Attempting to fix postgres
cbaker6 387258c
Attempting to fix postgres
cbaker6 dc3afa6
Attempting to fix postgres
cbaker6 06045a5
Attempting to fix postgres
cbaker6 ebcbbb0
Attempting to fix postgres
cbaker6 72f72a1
Attempting to fix postgres
cbaker6 2047e2e
Attempting to fix postgres
cbaker6 fa10637
Attempting to fix postgres
cbaker6 0bdc4f4
Temporary fix: separated mongo and postgres in travis
cbaker6 d60203d
Allowing all postgres to fail
cbaker6 a7c964b
Allowing multiple names to fail
cbaker6 d3e795a
Removing preinstalled versions of postgres from list
cbaker6 b0e224f
Use postgres made for dist
cbaker6 98d83e9
Second round
cbaker6 ddd6f4a
Round 3
cbaker6 efa17ff
Round 4
cbaker6 6a98945
Round 5
cbaker6 a3f72b8
Fixed issue with random postgres fail
cbaker6 5999aff
Added back postgres 11 and 12 to allow_failures
cbaker6 579124c
added travis scripts for postgres
cbaker6 38a2b9e
Setting up before_install and before_script
cbaker6 8b0f875
make scripts executable
cbaker6 ac3be67
Merge branch 'master' of https://github.com/netreconlab/parse-server
cbaker6 0052963
Update .travis.yml
cbaker6 a375604
add sourcing in script
cbaker6 8d26cbc
trying to fix source
cbaker6 dfcbe0d
fixing env var in script
cbaker6 a5aa417
fixed ; near then
cbaker6 cc91dc4
Cleaning up travis file
cbaker6 0e33072
Finishing clean up
cbaker6 773ca67
Fixing allow_failures since "name" was removed
cbaker6 fe0077c
Update .travis.yml
cbaker6 559e0a7
Removed Postgres 11 from allow_failures
cbaker6 2ceff98
I think using travis default postgres port of 5433 will allow us to n…
cbaker6 57a81cb
Merge branch 'master' of https://github.com/netreconlab/parse-server
cbaker6 7776457
Switching travis to postgres port 5433
cbaker6 59a3e8a
modifying script for test
cbaker6 3a099c1
modifying script for test
cbaker6 fc2006d
modifying script for test
cbaker6 4ffee37
reverting back to working way with removing postgres from image
cbaker6 8d17b04
Reverted back to removing postgres from image
cbaker6 84b4a64
removing postgres 12
cbaker6 839d3e6
removed postgres-12 from allow_failures
cbaker6 c1173cb
updated postgres method from deprecated. Also updating postgis to 3.0
cbaker6 648ea74
updated postgis to 3.0
cbaker6 3842083
Merge branch 'master' into master
cbaker6 6a6c2d4
Update .travis.yml
cbaker6 fca6973
fix Postgres test issues that causes some tests to fail locally when …
cbaker6 cc0f9c7
Merge branch 'master' of https://github.com/netreconlab/parse-server
cbaker6 bcf2116
removed dependence on creating adapter locally in testcase and use co…
cbaker6 530bc9d
fixed one more potential issue with postgres adapter
cbaker6 b4c6ee0
modified travis and script to leverage PARSE_SERVER_TEST_DATABASE_URI
cbaker6 b8ee28e
Merge branch 'master' into master
cbaker6 bdac2f4
changes to before install to reduce time
cbaker6 e90eeae
Merge branch 'master' of https://github.com/netreconlab/parse-server
cbaker6 4192af3
add updated port to script for psql connection
cbaker6 48d1461
fixed arg for psql
cbaker6 5265115
added back conf file as it probably contains the default permissions
cbaker6 4cd60df
seeing if stopping/starting postgres back-to-back was the issue
cbaker6 183e273
checking fix
cbaker6 5457858
revert to working version of install script
cbaker6 5a175d5
leave default port
cbaker6 2455281
removing uninstall of postgres from script
cbaker6 36d590a
looks like postgres won't start until the others are removed
cbaker6 ee57800
forgoing using posgres service and starting directly, hoping it allow…
cbaker6 8300f20
removed sudo for starting postgres
cbaker6 dc6e595
adding back sude, but using default user for postgres
cbaker6 59c9031
fix
cbaker6 8e27b46
don't start service
cbaker6 268c08a
init db cluster before starting
cbaker6 f93620f
remove folder befor init
cbaker6 c1dde02
remove folder befor init
cbaker6 b269e6b
still have to stop service
cbaker6 bd5a1f8
switch ports after new configs are made
cbaker6 160f5a5
switch ports after new configs are made
cbaker6 2eb7987
went back to removing to get it to start properly
cbaker6 f635706
seeing if you can use postgres installaition out of the box
cbaker6 fff3f0d
seeing if you can use postgres installaition out of the box
cbaker6 f03310e
copy hba file, then stop,start
cbaker6 020080e
testing using port as argument
cbaker6 79c7949
working version
cbaker6 c27c304
round 2
cbaker6 bb86193
updated documentation to reflect changes
cbaker6 4a8650e
use restart instead of stop/start for postgres
cbaker6 a70e1f9
removed extra lines to ensure consistency with future builds
cbaker6 9073081
reload instead of restart postgres
cbaker6 a03d511
restart postgres since we can't currently connect
cbaker6 fc73f17
Switch to testonly for postgres
cbaker6 861f048
run testonly
cbaker6 8d40f0c
Declare as mongo test since it's handed coded to a mongo uri
cbaker6 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I don't think this is necessary. Have you read the Contributor Guide
Does
PARSE_SERVER_TEST_DB=postgres npm test
work for you?Uh oh!
There was an error while loading. Please reload this page.
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.
@dplewis this test fails locally on my system using that command if I don’t have Postgres running on localhost using the standard port, 5432. This fix makes it work on any address/port Postgres is binded to by using the already defined PARSE_SERVER_TEST_DATABASE_URI environment variable. In the test cases current form, PARSE_SERVER_TEST_DATABASE_URI doesn’t work as
documentedintended without this fix. Two test fail in this case, which is I only fixed those.You can replicate the failure by dowloading Postgres via docker and binding to a different port.
I suspect this is why the Travis file has to change the Postgres config to 5432 as the newly installed Postgres installations use 5433 and the PARSE_SERVER_TEST_DATABASE_URI doesn’t work properly Edit: because of ParseQuery.FullTextSearch.spec.js and PostgresInitOptions.spec.js (the only two tests that fail) has the URI for postgres/mongo hardcoded instead of leveraging the config file like other tests (see my initial fix).
Uh oh!
There was an error while loading. Please reload this page.
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.
To my last point, after this pull request is reconciled, I plan on creating another one which edits the travis file and scripts to not have to stop/start postgres, nor have to remove older versions of postgres that are running on port 5432. Using PARSE_SERVER_TEST_DATABASE_URI should allow us to test on port 5433 directly after install of postgres without changing the image postgres config files (hopefully). I'm assuming this will speed up the postgres builds along with keeping the fix of the old postgres build issues.
If you think it's relevant enough, I can make the changes here if you think they are related enough and we can see how they go
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.
In addition, PARSE_SERVER_TEST_DATABASE_URI isn't mentioned in the Contributors Guide, but it is in the spec/helper.js and spec/ParseServer.js files. I can add this in as well.
Uh oh!
There was an error while loading. Please reload this page.
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.
Lastly, if anyone attempts to run a local test using the official Postgres (which PostGIS docker image uses), POSTGRES_PASSWORD has to be set or else the image won't build. This means that all local postgres tests using docker will require the use if PARSE_SERVER_TEST_DATABASE_URI as the default postgres URI set in the spec won't work. See my example below:
Note that I didn't use the mdillion/postgis image discussed in the Contributors Guide as it hasn't been updated in over a year.