Skip to main content

Test Environment

If you want to run some unit tests locally you need to setup the test env.\ Test env needs the same db structure as in real db and related seed data. All of them should be inside the test db - powr_test.

Create table if it doesn't exist. In postgres terminal:

-> CREATE DATABASE powr_test;

Unfortunately, some of your migrations are broken and running migration will be failed because of that we can just make a db local dump. In terminal:

Export dump

-> pg_dump powr_development > your-local-path/dump-name

Import dump

-> psql powr_test < your-local-path/dump-name

After that run migration if it is out of date

Prepare application.yml​

In application.yml under development key add the test key with these values:

test:
FOLLOWER_URL: ''
REDIS_URL: redis://localhost:6379
REDISTOGO_URL: redis://localhost:6379