-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.narval.yml
208 lines (208 loc) · 6.33 KB
/
.narval.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
schemas:
bind: &bind
- lib
- test
- server.js
- bin
coverage: &disable-coverage
enabled: false
envs:
local-service: &local-service-env
service_port: 3000
service_host_name: localhost
domapic_path: .test
service_extra_options: --remember=true
docker-service: &docker-service-env
service_port: 3000
service_host_name: module-container
domapic_path: .shared
service_extra_options: --remember=true
clean: &clean
local:
command: test/functional/commands/local-clean.sh
docker:
container: service-container
command: test/functional/commands/clean.sh
down-volumes: true
services:
local: &local-service
command: test/functional/commands/start-module.sh
env: *local-service-env
docker: &docker-service
container: module-container
command: test/functional/commands/start-module.sh
env: *docker-service-env
local-cli: &local-service-cli
<<: *local-service
command: test/functional/commands/start-module-cli.sh
docker-cli: &docker-service-cli
<<: *docker-service
command: test/functional/commands/start-module-cli.sh
test: &functional-test
local:
wait-on: tcp:localhost:3000
env: *local-service-env
docker:
container: test-container
wait-on: tcp:module-container:3000
env: *docker-service-env
docker-images:
- name: node-image
from: node:8.11.1
expose:
- 3000
add:
- package.json
- npm-shrinkwrap.json
install: test/functional/commands/install.sh
docker-containers:
- name: module-container
build: node-image
bind: *bind
- name: test-container
build: node-image
bind: *bind
suites:
unit:
- name: unit
test:
specs: test/unit
coverage:
config:
dir: .coverage
functional:
- name: api
describe: should set relay status and save data in storage for next restart
before: *clean
services:
- name: module
abort-on-error: true
local: *local-service
docker: *docker-service
test:
<<: *functional-test
specs:
- test/functional/specs/api.specs.js
coverage: *disable-coverage
- name: config
describe: should init the relay with provided configuration
before: *clean
services:
- name: module
abort-on-error: true
local:
<<: *local-service
env:
<<: *local-service-env
service_extra_options: --remember=true --initialStatus=true --gpio=54 --invert=true
docker:
<<: *docker-service
env:
<<: *docker-service-env
service_extra_options: --remember=true --initialStatus=true --gpio=54 --invert=true
test:
<<: *functional-test
specs:
- test/functional/specs/config.specs.js
- test/functional/specs/api.specs.js
coverage: *disable-coverage
- name: non-persisted-status
describe: should not remember last relay status when restarted
services:
- name: module
abort-on-error: true
local:
<<: *local-service
env:
<<: *local-service-env
service_extra_options: --gpio=54 --invert=true
docker:
<<: *docker-service
env:
<<: *docker-service-env
service_extra_options: --gpio=54 --invert=true
test:
<<: *functional-test
specs:
- test/functional/specs/non-persisted-status.specs.js
coverage: *disable-coverage
- name: persisted-status
describe: should remember last relay status when restarted
services:
- name: module
abort-on-error: true
local:
<<: *local-service
env:
<<: *local-service-env
service_extra_options: --remember=true --gpio=54 --invert=true
docker:
<<: *docker-service
env:
<<: *docker-service-env
service_extra_options: --remember=true --gpio=54 --invert=true
test:
<<: *functional-test
specs:
- test/functional/specs/persisted-status.specs.js
- test/functional/specs/api.specs.js
coverage: *disable-coverage
- name: api-cli
describe: should set relay status and save data in storage for next restart when started using cli
before: *clean
services:
- name: module
abort-on-error: true
local: *local-service-cli
docker: *docker-service-cli
test:
<<: *functional-test
specs:
- test/functional/specs/api.specs.js
coverage: *disable-coverage
- name: config-cli
describe: should init the relay with provided configuration when started using cli
before: *clean
services:
- name: module
abort-on-error: true
local:
<<: *local-service-cli
env:
<<: *local-service-env
service_extra_options: --remember=true --initialStatus=true --gpio=54 --invert=true
docker:
<<: *docker-service-cli
env:
<<: *docker-service-env
service_extra_options: --remember=true --initialStatus=true --gpio=54 --invert=true
test:
<<: *functional-test
specs:
- test/functional/specs/config.specs.js
- test/functional/specs/api.specs.js
coverage: *disable-coverage
- name: persisted-status-cli
describe: should remember last relay status when restarted using cli
before:
local:
command: test/functional/commands/pm2-clean.sh
services:
- name: module
abort-on-error: true
local:
<<: *local-service
env:
<<: *local-service-env
service_extra_options: --remember=true --gpio=54 --invert=true
docker:
<<: *docker-service
env:
<<: *docker-service-env
service_extra_options: --remember=true --gpio=54 --invert=true
test:
<<: *functional-test
specs:
- test/functional/specs/persisted-status.specs.js
- test/functional/specs/api.specs.js
coverage: *disable-coverage