File tree 3 files changed +18
-7
lines changed
3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change
1
+ /test /config.js
1
2
* .swo
2
3
* .un~
Original file line number Diff line number Diff line change @@ -2,14 +2,16 @@ var path = require('path');
2
2
require . paths . unshift ( path . dirname ( __dirname ) + '/lib' ) ;
3
3
var sys = require ( 'mysql/sys' ) ;
4
4
5
- global . TEST_DB = 'node_mysql_test' ;
6
- global . TEST_CONFIG = {
7
- host : 'localhost' ,
8
- port : 3306 ,
9
- user : 'root' ,
10
- password : 'root'
11
- } ;
5
+ if ( module . parent . filename . match ( / t e s t \/ s y s t e m / ) ) {
6
+ try {
7
+ global . TEST_CONFIG = require ( './config.js' ) ;
8
+ } catch ( e ) {
9
+ console . log ( 'Skipping. See test/config.template.js for more information.' ) ;
10
+ process . exit ( 0 ) ;
11
+ }
12
+ }
12
13
14
+ global . TEST_DB = 'node_mysql_test' ;
13
15
global . TEST_TABLE = 'posts' ;
14
16
global . TEST_FIXTURES = path . join ( __dirname , 'fixture' ) ;
15
17
Original file line number Diff line number Diff line change
1
+ // Copy this file to test/config.js and fill in your own credentials in order
2
+ // to run the system test suite.
3
+ module . exports = {
4
+ host : 'localhost' ,
5
+ port : 3306 ,
6
+ user : 'root' ,
7
+ password : 'root'
8
+ } ;
You can’t perform that action at this time.
0 commit comments