File tree Expand file tree Collapse file tree 5 files changed +31
-12
lines changed Expand file tree Collapse file tree 5 files changed +31
-12
lines changed Original file line number Diff line number Diff line change
1
+ FROM nodesource/node:4.2
2
+
3
+ ADD package.json package.json
4
+ RUN npm install
5
+ ADD . .
Original file line number Diff line number Diff line change
1
+ adapter :
2
+ build : .
3
+ volumes :
4
+ - .:/usr/src/app
5
+ links :
6
+ - postgres
7
+
8
+ postgres :
9
+ image : postgres:9.4
10
+ environment :
11
+ - POSTGRES_PASSWORD=sails
12
+ - POSTGRES_USER=sails
13
+ - POSTGRES_DB=sailspg
Original file line number Diff line number Diff line change 29
29
"waterline-adapter-tests" : " 0.10.18"
30
30
},
31
31
"scripts" : {
32
- "test" : " make test"
32
+ "test" : " make test" ,
33
+ "docker" : " docker-compose run adapter bash"
33
34
},
34
35
"main" : " lib/adapter" ,
35
36
"directories" : {
Original file line number Diff line number Diff line change @@ -69,11 +69,11 @@ new TestRunner({
69
69
70
70
// Default connection config to use.
71
71
config : {
72
- host : 'localhost' ,
73
- user : process . env . DB_USER || 'root ' ,
74
- password : process . env . DB_PASS || '' ,
75
- database : 'sailspg' ,
76
- port : 5432 ,
72
+ host : process . env . POSTGRES_1_PORT_5432_TCP_ADDR || process . env . WATERLINE_ADAPTER_TESTS_HOST || 'localhost' ,
73
+ user : process . env . WATERLINE_ADAPTER_TESTS_USER || 'sails ' ,
74
+ password : process . env . WATERLINE_ADAPTER_TESTS_PASSWORD || 'sails ' ,
75
+ database : process . env . WATERLINE_ADAPTER_TESTS_DATABASE || 'sailspg' ,
76
+ port : process . env . WATERLINE_ADAPTER_TESTS_PORT || 5432 ,
77
77
schema : true ,
78
78
ssl : false
79
79
} ,
@@ -82,7 +82,7 @@ new TestRunner({
82
82
// The set of adapter interfaces to test against.
83
83
// (grabbed these from this adapter's package.json file above)
84
84
interfaces : interfaces ,
85
-
85
+
86
86
// The set of adapter features to test against.
87
87
// (grabbed these from this adapter's package.json file above)
88
88
features : features ,
Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ Support.SqlOptions = {
19
19
} ;
20
20
21
21
Support . Config = {
22
- host : 'localhost' ,
23
- user : process . env . DB_USER || 'root ' ,
24
- password : process . env . DB_PASS || '' ,
25
- database : 'sailspg' ,
26
- port : 5432
22
+ host : process . env . POSTGRES_1_PORT_5432_TCP_ADDR || process . env . WATERLINE_ADAPTER_TESTS_HOST || 'localhost' ,
23
+ user : process . env . WATERLINE_ADAPTER_TESTS_USER || 'sails ' ,
24
+ password : process . env . WATERLINE_ADAPTER_TESTS_PASSWORD || 'sails ' ,
25
+ database : process . env . WATERLINE_ADAPTER_TESTS_DATABASE || 'sailspg' ,
26
+ port : process . env . WATERLINE_ADAPTER_TESTS_PORT || 5432
27
27
} ;
28
28
29
29
// Fixture Collection Def
You can’t perform that action at this time.
0 commit comments