File tree 1 file changed +35
-0
lines changed 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -356,3 +356,38 @@ to run them using our preconfigured test server.
356
356
1 . Ask a core developer for instructions on how to set up test server
357
357
credentials on your machine
358
358
2 . ` npm test `
359
+
360
+ If you wish to run the tests using your own test database instance,
361
+
362
+ __ Set up the database__
363
+
364
+ 1 . Go to pgAdmin.
365
+ By default, the local database is one of the servers under Server Groups > Servers.
366
+ 2 . Under Login Roles, add a user called ``` strongloop ``` .
367
+
368
+ __ Change configuration for database connection__
369
+
370
+ In ``` test\init.js ``` , change the value of ``` config ``` to be pointing to the local database. For example,
371
+ ```
372
+ var config = {
373
+ host: 'localhost',
374
+ port: '5432',
375
+ database:'strongloop',
376
+ username: 'postgres',
377
+ password: 'postgres',
378
+ };
379
+ ```
380
+
381
+ __ Troubleshooting__
382
+
383
+ When running npm test, it runs the ``` pretest.js ``` which eventually runs ``` schema.sql ``` to set up the database and tables.
384
+ If there is problem, you can run the ``` schema.sql ``` manually. To do this:
385
+
386
+ 1 . Go to SQL Shell (psql)
387
+ 2 . Run:
388
+ ```
389
+ \i <<file path>>
390
+
391
+ For example on Windows,
392
+ \i c:\somepath\test\schema.sql
393
+ ```
You can’t perform that action at this time.
0 commit comments