These are chat archives for mirumee/saleor

18th
Jun 2018
NyanKiyoshi
@NyanKiyoshi
Jun 18 2018 03:42

@shamhaad180 it doesn't create a SQLite DB. But it creates a postgres testing database (test_saleor). You need a running postgres server, but no need to create a db for testing, it will do it automatically.

Nothing else to do apart from installing the Python requirements and compiling the assets and mail templates.

Shamhaad
@shamhaad180
Jun 18 2018 03:45
I am running postgres on Google cloud. So that may be it? I get almost everything failed. Will check the errors once again. Thanks for input.
NyanKiyoshi
@NyanKiyoshi
Jun 18 2018 03:54

If you want to use your Google Cloud Postgres Server in tests, you can manually set the database url in tests/settings.py by adding those lines and customizing them at the end of the file:

DATABASES['default']['TEST'] = dj_database_url.config(
        default='postgres://saleor:saleor@localhost:5432/test_saleor',
        conn_max_age=600)

But running a local server is way enough and quicker

Shamhaad
@shamhaad180
Jun 18 2018 03:59
Will do up a local server for testing. Thank you.
Patryk Zawadzki
@patrys
Jun 18 2018 08:59
we always recommend a local DB server for testing, executing all queries on a remote host will make all tests last much longer