dittodb icon indicating copy to clipboard operation
dittodb copied to clipboard

different passwords

Open pachadotdev opened this issue 4 years ago • 3 comments

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.

pachadotdev avatar Apr 27 '20 13:04 pachadotdev

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

jonkeane avatar Apr 27 '20 14:04 jonkeane

Postgres-docker.sh

On Mon, Apr 27, 2020, 10:20 AM Jonathan Keane [email protected] wrote:

Hmmm that shouldn't be the case. When you experienced that did you use postgres-docker-reset.sh https://github.com/jonkeane/dittodb/blob/master/db-setup/postgres-docker-reset.sh or postgres-docker.sh https://github.com/jonkeane/dittodb/blob/master/db-setup/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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jonkeane/dittodb/issues/85#issuecomment-620018301, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACM7UOP23OKU6B23OFXPD2LROWIDPANCNFSM4MR5USPA .

pachadotdev avatar Apr 27 '20 14:04 pachadotdev

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

jonkeane avatar Apr 28 '20 02:04 jonkeane