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

different passwords #85

Open
pachadotdev opened this issue Apr 27, 2020 · 3 comments
Open

different passwords #85

pachadotdev opened this issue Apr 27, 2020 · 3 comments

Comments

@pachadotdev
Copy link
Collaborator

pachadotdev commented Apr 27, 2020

Hi

The password from https://github.com/jonkeane/dittodb/blob/master/db-setup/postgres-docker.sh has to be pasted at https://github.com/jonkeane/dittodb/blob/master/tests/testthat/setup.R. Otherwise, the tests that have to be manually run (https://github.com/jonkeane/dittodb/blob/master/tests/testthat/test-dbi-generic-integration.R) won't work because of wrong password.

@jonkeane
Copy link
Collaborator

Hmmm that shouldn't be the case. When you experienced that did you use postgres-docker-reset.sh or postgres-docker.sh?

The script postgres-docker-reset.sh also runs the two sql scripts that set up the database (https://github.com/jonkeane/dittodb/blob/master/db-setup/postgres-reset.sql and https://github.com/jonkeane/dittodb/blob/master/db-setup/postgres-nycflights.sql) the first script there is what sets the password used by the test user https://github.com/jonkeane/dittodb/blob/master/db-setup/postgres-reset.sql#L8 which matches the value in https://github.com/jonkeane/dittodb/blob/master/tests/testthat/setup.R.

The password in https://github.com/jonkeane/dittodb/blob/master/db-setup/postgres-docker.sh is supposed to be the root database password, not the password for the test account.

But I definitely agree that this is a bit confusing. I wonder if it would be better for the postgres-docker-reset.sh script to be called instead something like postgres-docker-and-setup-data.sh to make it clearer that that is the main docker starting script and to call postgres-docker.sh something like postgres-docker-container.sh

@pachadotdev
Copy link
Collaborator Author

pachadotdev commented Apr 27, 2020 via email

@jonkeane jonkeane mentioned this issue Apr 28, 2020
@jonkeane
Copy link
Collaborator

I've added a few more details to the dev-docs PR and renamed some of the scripts so that hopefully it's clearer which are the two scripts that are most intended to be used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants