slicetest 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +118 -30
- package/dist/app.js +10 -2
- package/dist/auth.js +2 -1
- package/dist/cli-run.d.ts +40 -0
- package/dist/cli-run.js +65 -0
- package/dist/cli.js +20 -34
- package/dist/config.d.ts +33 -2
- package/dist/config.js +82 -8
- package/dist/container-runtime.d.ts +4 -0
- package/dist/container-runtime.js +16 -0
- package/dist/containers.js +4 -3
- package/dist/db.d.ts +3 -1
- package/dist/db.js +45 -8
- package/dist/deadline.d.ts +7 -0
- package/dist/deadline.js +24 -0
- package/dist/doctor.js +27 -5
- package/dist/drivers/driver.d.ts +6 -0
- package/dist/drivers/mysql.js +5 -1
- package/dist/drivers/postgres.d.ts +2 -0
- package/dist/drivers/postgres.js +20 -1
- package/dist/exit.d.ts +1 -0
- package/dist/exit.js +28 -0
- package/dist/form.d.ts +1 -0
- package/dist/form.js +50 -6
- package/dist/har.js +2 -2
- package/dist/http.d.ts +9 -3
- package/dist/http.js +40 -5
- package/dist/init.js +11 -2
- package/dist/list.d.ts +1 -0
- package/dist/list.js +16 -3
- package/dist/mail.d.ts +1 -1
- package/dist/mail.js +7 -7
- package/dist/matchers.d.ts +4 -3
- package/dist/matchers.js +18 -6
- package/dist/openapi.d.ts +2 -0
- package/dist/openapi.js +133 -14
- package/dist/record-cli.js +2 -1
- package/dist/record.js +2 -1
- package/dist/recording.d.ts +4 -1
- package/dist/recording.js +14 -3
- package/dist/request-url.d.ts +1 -0
- package/dist/request-url.js +5 -0
- package/dist/runtime.d.ts +3 -3
- package/dist/runtime.js +132 -18
- package/dist/scenario.js +11 -2
- package/dist/stub.js +17 -6
- package/dist/vitest.d.ts +4 -0
- package/dist/vitest.js +6 -2
- package/dist/webhook.d.ts +3 -3
- package/dist/webhook.js +10 -2
- package/dist/yaml-runtime.d.ts +4 -4
- package/dist/yaml-runtime.js +96 -34
- package/dist/yaml.d.ts +4 -0
- package/dist/yaml.js +33 -2
- package/docs/guarantees.md +92 -0
- package/docs/state-isolation.md +94 -0
- package/package.json +4 -1
- package/schema/config.schema.json +675 -0
- package/schema/scenario.schema.json +27 -3
|
@@ -0,0 +1,675 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://unpkg.com/slicetest/schema/config.schema.json",
|
|
4
|
+
"title": "slicetest config (slicetest.config.yaml)",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"app"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"$schema": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"app": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"required": [
|
|
18
|
+
"command"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"command": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1,
|
|
24
|
+
"description": "Command that starts it, run through the shell"
|
|
25
|
+
},
|
|
26
|
+
"build": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1,
|
|
29
|
+
"description": "Command run once per run before any worker starts it, e.g. npm run build"
|
|
30
|
+
},
|
|
31
|
+
"cwd": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "Working directory, relative to the config file"
|
|
34
|
+
},
|
|
35
|
+
"env": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"description": "Environment variables. Values may use {{app.port}}, {{db.url}}, {{stub.<name>}}, {{service.<name>}}, {{container.<name>}}, {{mail.*}} and {{auth.*}}.",
|
|
38
|
+
"additionalProperties": {
|
|
39
|
+
"type": [
|
|
40
|
+
"string",
|
|
41
|
+
"number",
|
|
42
|
+
"boolean"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"ready": {
|
|
47
|
+
"description": "How to tell the process is up",
|
|
48
|
+
"oneOf": [
|
|
49
|
+
{
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": [
|
|
53
|
+
"path"
|
|
54
|
+
],
|
|
55
|
+
"properties": {
|
|
56
|
+
"path": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"pattern": "^/",
|
|
59
|
+
"description": "Polled until it answers below 500"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"required": [
|
|
67
|
+
"log"
|
|
68
|
+
],
|
|
69
|
+
"properties": {
|
|
70
|
+
"log": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "A line the process prints when ready"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"readyTimeout": {
|
|
79
|
+
"type": "number",
|
|
80
|
+
"exclusiveMinimum": 0,
|
|
81
|
+
"description": "Milliseconds to wait for readiness (default 30000)"
|
|
82
|
+
},
|
|
83
|
+
"restart": {
|
|
84
|
+
"enum": [
|
|
85
|
+
"never",
|
|
86
|
+
"scenario"
|
|
87
|
+
],
|
|
88
|
+
"description": "scenario: stop before each reset, start after"
|
|
89
|
+
},
|
|
90
|
+
"reset": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"additionalProperties": false,
|
|
93
|
+
"required": [
|
|
94
|
+
"path"
|
|
95
|
+
],
|
|
96
|
+
"description": "Endpoint called after the database reset to drop in-process state",
|
|
97
|
+
"properties": {
|
|
98
|
+
"path": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"pattern": "^/(?![/\\\\])[^\\s\\\\]*$",
|
|
101
|
+
"description": "A path on the process, e.g. /__test/reset"
|
|
102
|
+
},
|
|
103
|
+
"method": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"enum": [
|
|
106
|
+
"GET",
|
|
107
|
+
"POST",
|
|
108
|
+
"PUT",
|
|
109
|
+
"PATCH",
|
|
110
|
+
"DELETE",
|
|
111
|
+
"HEAD",
|
|
112
|
+
"get",
|
|
113
|
+
"post",
|
|
114
|
+
"put",
|
|
115
|
+
"patch",
|
|
116
|
+
"delete",
|
|
117
|
+
"head"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"timeout": {
|
|
121
|
+
"type": "integer",
|
|
122
|
+
"minimum": 1,
|
|
123
|
+
"maximum": 600000,
|
|
124
|
+
"description": "Milliseconds (default 5000)"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"idle": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"additionalProperties": false,
|
|
131
|
+
"required": [
|
|
132
|
+
"path"
|
|
133
|
+
],
|
|
134
|
+
"description": "Endpoint polled after each scenario until it answers 2xx (no background work left)",
|
|
135
|
+
"properties": {
|
|
136
|
+
"path": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"pattern": "^/(?![/\\\\])[^\\s\\\\]*$",
|
|
139
|
+
"description": "A path on the process, e.g. /__test/reset"
|
|
140
|
+
},
|
|
141
|
+
"method": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"enum": [
|
|
144
|
+
"GET",
|
|
145
|
+
"POST",
|
|
146
|
+
"PUT",
|
|
147
|
+
"PATCH",
|
|
148
|
+
"DELETE",
|
|
149
|
+
"HEAD",
|
|
150
|
+
"get",
|
|
151
|
+
"post",
|
|
152
|
+
"put",
|
|
153
|
+
"patch",
|
|
154
|
+
"delete",
|
|
155
|
+
"head"
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
"timeout": {
|
|
159
|
+
"type": "integer",
|
|
160
|
+
"minimum": 1,
|
|
161
|
+
"maximum": 600000,
|
|
162
|
+
"description": "Milliseconds (default 5000)"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"scope": {
|
|
167
|
+
"enum": [
|
|
168
|
+
"file",
|
|
169
|
+
"worker"
|
|
170
|
+
],
|
|
171
|
+
"description": "worker: start the app once per Vitest worker instead of per test file"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"db": {
|
|
176
|
+
"description": "The database, or false for an app without one",
|
|
177
|
+
"oneOf": [
|
|
178
|
+
{
|
|
179
|
+
"const": false
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"type": "object",
|
|
183
|
+
"additionalProperties": false,
|
|
184
|
+
"properties": {
|
|
185
|
+
"engine": {
|
|
186
|
+
"enum": [
|
|
187
|
+
"postgres",
|
|
188
|
+
"mysql",
|
|
189
|
+
"sqlite"
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
"image": {
|
|
193
|
+
"type": "string",
|
|
194
|
+
"description": "Default postgres:17-alpine, or mysql:8.4"
|
|
195
|
+
},
|
|
196
|
+
"url": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"description": "An existing server (superuser) instead of a container; default SLICETEST_DATABASE_URL"
|
|
199
|
+
},
|
|
200
|
+
"migrate": {
|
|
201
|
+
"oneOf": [
|
|
202
|
+
{
|
|
203
|
+
"type": "object",
|
|
204
|
+
"additionalProperties": false,
|
|
205
|
+
"required": [
|
|
206
|
+
"atlas"
|
|
207
|
+
],
|
|
208
|
+
"properties": {
|
|
209
|
+
"atlas": {
|
|
210
|
+
"type": "object",
|
|
211
|
+
"additionalProperties": false,
|
|
212
|
+
"required": [
|
|
213
|
+
"dir"
|
|
214
|
+
],
|
|
215
|
+
"properties": {
|
|
216
|
+
"dir": {
|
|
217
|
+
"type": "string"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"type": "object",
|
|
225
|
+
"additionalProperties": false,
|
|
226
|
+
"required": [
|
|
227
|
+
"sql"
|
|
228
|
+
],
|
|
229
|
+
"properties": {
|
|
230
|
+
"sql": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"description": "A SQL file or a directory of them"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"type": "object",
|
|
238
|
+
"additionalProperties": false,
|
|
239
|
+
"required": [
|
|
240
|
+
"command"
|
|
241
|
+
],
|
|
242
|
+
"properties": {
|
|
243
|
+
"command": {
|
|
244
|
+
"type": "string"
|
|
245
|
+
},
|
|
246
|
+
"inputs": {
|
|
247
|
+
"type": "array",
|
|
248
|
+
"items": {
|
|
249
|
+
"type": "string"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"env": {
|
|
253
|
+
"type": "object",
|
|
254
|
+
"description": "Environment variables. Values may use {{app.port}}, {{db.url}}, {{stub.<name>}}, {{service.<name>}}, {{container.<name>}}, {{mail.*}} and {{auth.*}}.",
|
|
255
|
+
"additionalProperties": {
|
|
256
|
+
"type": [
|
|
257
|
+
"string",
|
|
258
|
+
"number",
|
|
259
|
+
"boolean"
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
"seed": {
|
|
268
|
+
"oneOf": [
|
|
269
|
+
{
|
|
270
|
+
"type": "string"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"type": "array",
|
|
274
|
+
"minItems": 1,
|
|
275
|
+
"items": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"minLength": 1
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
"description": "Files re-applied after every reset: SQL, or YAML / JSON rows per table"
|
|
282
|
+
},
|
|
283
|
+
"schemas": {
|
|
284
|
+
"type": "array",
|
|
285
|
+
"items": {
|
|
286
|
+
"type": "string"
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"keep": {
|
|
290
|
+
"type": "array",
|
|
291
|
+
"items": {
|
|
292
|
+
"type": "string"
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"ignoreChanges": {
|
|
296
|
+
"type": "array",
|
|
297
|
+
"items": {
|
|
298
|
+
"type": "string",
|
|
299
|
+
"minLength": 1,
|
|
300
|
+
"pattern": "^[^.]"
|
|
301
|
+
},
|
|
302
|
+
"description": "updated_at, orders.synced_at, sessions.*"
|
|
303
|
+
},
|
|
304
|
+
"reuse": {
|
|
305
|
+
"type": "boolean"
|
|
306
|
+
},
|
|
307
|
+
"queries": {
|
|
308
|
+
"type": "boolean"
|
|
309
|
+
},
|
|
310
|
+
"neon": {
|
|
311
|
+
"type": "boolean"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
},
|
|
317
|
+
"stubs": {
|
|
318
|
+
"type": "array",
|
|
319
|
+
"items": {
|
|
320
|
+
"oneOf": [
|
|
321
|
+
{
|
|
322
|
+
"type": "string",
|
|
323
|
+
"pattern": "^[\\w-]+$"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"type": "object",
|
|
327
|
+
"additionalProperties": false,
|
|
328
|
+
"required": [
|
|
329
|
+
"name"
|
|
330
|
+
],
|
|
331
|
+
"properties": {
|
|
332
|
+
"name": {
|
|
333
|
+
"type": "string",
|
|
334
|
+
"pattern": "^[\\w-]+$"
|
|
335
|
+
},
|
|
336
|
+
"openapi": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"description": "The provider's OpenAPI spec"
|
|
339
|
+
},
|
|
340
|
+
"autoReply": {
|
|
341
|
+
"type": "boolean",
|
|
342
|
+
"description": "Answer unmatched calls from the spec"
|
|
343
|
+
},
|
|
344
|
+
"upstream": {
|
|
345
|
+
"type": "string",
|
|
346
|
+
"pattern": "^https?://[^/]",
|
|
347
|
+
"description": "The real service, for recordings"
|
|
348
|
+
},
|
|
349
|
+
"recordings": {
|
|
350
|
+
"type": "string"
|
|
351
|
+
},
|
|
352
|
+
"hosts": {
|
|
353
|
+
"type": "array",
|
|
354
|
+
"minItems": 1,
|
|
355
|
+
"items": {
|
|
356
|
+
"type": "string"
|
|
357
|
+
},
|
|
358
|
+
"description": "Hosts the app calls directly, answered by this stub"
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
"openapi": {
|
|
366
|
+
"oneOf": [
|
|
367
|
+
{
|
|
368
|
+
"type": "string",
|
|
369
|
+
"minLength": 1
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"type": "object",
|
|
373
|
+
"additionalProperties": false,
|
|
374
|
+
"properties": {
|
|
375
|
+
"spec": {
|
|
376
|
+
"type": "string"
|
|
377
|
+
},
|
|
378
|
+
"fromApp": {
|
|
379
|
+
"type": "string",
|
|
380
|
+
"pattern": "^/"
|
|
381
|
+
},
|
|
382
|
+
"minCoverage": {
|
|
383
|
+
"type": "number",
|
|
384
|
+
"minimum": 0,
|
|
385
|
+
"maximum": 100
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
]
|
|
390
|
+
},
|
|
391
|
+
"http": {
|
|
392
|
+
"type": "object",
|
|
393
|
+
"additionalProperties": false,
|
|
394
|
+
"properties": {
|
|
395
|
+
"headers": {
|
|
396
|
+
"type": "object",
|
|
397
|
+
"additionalProperties": {
|
|
398
|
+
"type": "string"
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
"query": {
|
|
402
|
+
"type": "object"
|
|
403
|
+
},
|
|
404
|
+
"follow": {
|
|
405
|
+
"type": "boolean"
|
|
406
|
+
},
|
|
407
|
+
"timeout": {
|
|
408
|
+
"type": "number",
|
|
409
|
+
"exclusiveMinimum": 0
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"services": {
|
|
414
|
+
"type": "object",
|
|
415
|
+
"propertyNames": {
|
|
416
|
+
"pattern": "^[\\w-]+$"
|
|
417
|
+
},
|
|
418
|
+
"additionalProperties": {
|
|
419
|
+
"type": "object",
|
|
420
|
+
"additionalProperties": false,
|
|
421
|
+
"required": [
|
|
422
|
+
"command"
|
|
423
|
+
],
|
|
424
|
+
"properties": {
|
|
425
|
+
"command": {
|
|
426
|
+
"type": "string",
|
|
427
|
+
"minLength": 1,
|
|
428
|
+
"description": "Command that starts it, run through the shell"
|
|
429
|
+
},
|
|
430
|
+
"build": {
|
|
431
|
+
"type": "string",
|
|
432
|
+
"minLength": 1,
|
|
433
|
+
"description": "Command run once per run before any worker starts it, e.g. npm run build"
|
|
434
|
+
},
|
|
435
|
+
"cwd": {
|
|
436
|
+
"type": "string",
|
|
437
|
+
"description": "Working directory, relative to the config file"
|
|
438
|
+
},
|
|
439
|
+
"env": {
|
|
440
|
+
"type": "object",
|
|
441
|
+
"description": "Environment variables. Values may use {{app.port}}, {{db.url}}, {{stub.<name>}}, {{service.<name>}}, {{container.<name>}}, {{mail.*}} and {{auth.*}}.",
|
|
442
|
+
"additionalProperties": {
|
|
443
|
+
"type": [
|
|
444
|
+
"string",
|
|
445
|
+
"number",
|
|
446
|
+
"boolean"
|
|
447
|
+
]
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
"ready": {
|
|
451
|
+
"description": "How to tell the process is up",
|
|
452
|
+
"oneOf": [
|
|
453
|
+
{
|
|
454
|
+
"type": "object",
|
|
455
|
+
"additionalProperties": false,
|
|
456
|
+
"required": [
|
|
457
|
+
"path"
|
|
458
|
+
],
|
|
459
|
+
"properties": {
|
|
460
|
+
"path": {
|
|
461
|
+
"type": "string",
|
|
462
|
+
"pattern": "^/",
|
|
463
|
+
"description": "Polled until it answers below 500"
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"type": "object",
|
|
469
|
+
"additionalProperties": false,
|
|
470
|
+
"required": [
|
|
471
|
+
"log"
|
|
472
|
+
],
|
|
473
|
+
"properties": {
|
|
474
|
+
"log": {
|
|
475
|
+
"type": "string",
|
|
476
|
+
"description": "A line the process prints when ready"
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
]
|
|
481
|
+
},
|
|
482
|
+
"readyTimeout": {
|
|
483
|
+
"type": "number",
|
|
484
|
+
"exclusiveMinimum": 0,
|
|
485
|
+
"description": "Milliseconds to wait for readiness (default 30000)"
|
|
486
|
+
},
|
|
487
|
+
"restart": {
|
|
488
|
+
"enum": [
|
|
489
|
+
"never",
|
|
490
|
+
"scenario"
|
|
491
|
+
],
|
|
492
|
+
"description": "scenario: stop before each reset, start after"
|
|
493
|
+
},
|
|
494
|
+
"reset": {
|
|
495
|
+
"type": "object",
|
|
496
|
+
"additionalProperties": false,
|
|
497
|
+
"required": [
|
|
498
|
+
"path"
|
|
499
|
+
],
|
|
500
|
+
"description": "Endpoint called after the database reset to drop in-process state",
|
|
501
|
+
"properties": {
|
|
502
|
+
"path": {
|
|
503
|
+
"type": "string",
|
|
504
|
+
"pattern": "^/(?![/\\\\])[^\\s\\\\]*$",
|
|
505
|
+
"description": "A path on the process, e.g. /__test/reset"
|
|
506
|
+
},
|
|
507
|
+
"method": {
|
|
508
|
+
"type": "string",
|
|
509
|
+
"enum": [
|
|
510
|
+
"GET",
|
|
511
|
+
"POST",
|
|
512
|
+
"PUT",
|
|
513
|
+
"PATCH",
|
|
514
|
+
"DELETE",
|
|
515
|
+
"HEAD",
|
|
516
|
+
"get",
|
|
517
|
+
"post",
|
|
518
|
+
"put",
|
|
519
|
+
"patch",
|
|
520
|
+
"delete",
|
|
521
|
+
"head"
|
|
522
|
+
]
|
|
523
|
+
},
|
|
524
|
+
"timeout": {
|
|
525
|
+
"type": "integer",
|
|
526
|
+
"minimum": 1,
|
|
527
|
+
"maximum": 600000,
|
|
528
|
+
"description": "Milliseconds (default 5000)"
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
"idle": {
|
|
533
|
+
"type": "object",
|
|
534
|
+
"additionalProperties": false,
|
|
535
|
+
"required": [
|
|
536
|
+
"path"
|
|
537
|
+
],
|
|
538
|
+
"description": "Endpoint polled after each scenario until it answers 2xx (no background work left)",
|
|
539
|
+
"properties": {
|
|
540
|
+
"path": {
|
|
541
|
+
"type": "string",
|
|
542
|
+
"pattern": "^/(?![/\\\\])[^\\s\\\\]*$",
|
|
543
|
+
"description": "A path on the process, e.g. /__test/reset"
|
|
544
|
+
},
|
|
545
|
+
"method": {
|
|
546
|
+
"type": "string",
|
|
547
|
+
"enum": [
|
|
548
|
+
"GET",
|
|
549
|
+
"POST",
|
|
550
|
+
"PUT",
|
|
551
|
+
"PATCH",
|
|
552
|
+
"DELETE",
|
|
553
|
+
"HEAD",
|
|
554
|
+
"get",
|
|
555
|
+
"post",
|
|
556
|
+
"put",
|
|
557
|
+
"patch",
|
|
558
|
+
"delete",
|
|
559
|
+
"head"
|
|
560
|
+
]
|
|
561
|
+
},
|
|
562
|
+
"timeout": {
|
|
563
|
+
"type": "integer",
|
|
564
|
+
"minimum": 1,
|
|
565
|
+
"maximum": 600000,
|
|
566
|
+
"description": "Milliseconds (default 5000)"
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
"containers": {
|
|
574
|
+
"type": "object",
|
|
575
|
+
"propertyNames": {
|
|
576
|
+
"pattern": "^[\\w-]+$"
|
|
577
|
+
},
|
|
578
|
+
"additionalProperties": {
|
|
579
|
+
"type": "object",
|
|
580
|
+
"additionalProperties": false,
|
|
581
|
+
"required": [
|
|
582
|
+
"image",
|
|
583
|
+
"port"
|
|
584
|
+
],
|
|
585
|
+
"properties": {
|
|
586
|
+
"image": {
|
|
587
|
+
"type": "string",
|
|
588
|
+
"minLength": 1
|
|
589
|
+
},
|
|
590
|
+
"port": {
|
|
591
|
+
"type": "integer",
|
|
592
|
+
"minimum": 1
|
|
593
|
+
},
|
|
594
|
+
"env": {
|
|
595
|
+
"type": "object",
|
|
596
|
+
"description": "Environment variables. Values may use {{app.port}}, {{db.url}}, {{stub.<name>}}, {{service.<name>}}, {{container.<name>}}, {{mail.*}} and {{auth.*}}.",
|
|
597
|
+
"additionalProperties": {
|
|
598
|
+
"type": [
|
|
599
|
+
"string",
|
|
600
|
+
"number",
|
|
601
|
+
"boolean"
|
|
602
|
+
]
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
"command": {
|
|
606
|
+
"type": "array",
|
|
607
|
+
"minItems": 1,
|
|
608
|
+
"items": {
|
|
609
|
+
"type": "string"
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
"ready": {
|
|
613
|
+
"type": "object",
|
|
614
|
+
"additionalProperties": false,
|
|
615
|
+
"required": [
|
|
616
|
+
"log"
|
|
617
|
+
],
|
|
618
|
+
"properties": {
|
|
619
|
+
"log": {
|
|
620
|
+
"type": "string"
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
"reset": {
|
|
625
|
+
"type": "array",
|
|
626
|
+
"minItems": 1,
|
|
627
|
+
"items": {
|
|
628
|
+
"type": "string"
|
|
629
|
+
},
|
|
630
|
+
"description": "Run inside the container before each scenario"
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
"mail": {
|
|
636
|
+
"type": "boolean"
|
|
637
|
+
},
|
|
638
|
+
"offline": {
|
|
639
|
+
"type": "boolean"
|
|
640
|
+
},
|
|
641
|
+
"strictStubs": {
|
|
642
|
+
"type": "boolean"
|
|
643
|
+
},
|
|
644
|
+
"workers": {
|
|
645
|
+
"type": "integer",
|
|
646
|
+
"minimum": 1
|
|
647
|
+
},
|
|
648
|
+
"auth": {
|
|
649
|
+
"oneOf": [
|
|
650
|
+
{
|
|
651
|
+
"type": "boolean"
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
"type": "object",
|
|
655
|
+
"additionalProperties": false,
|
|
656
|
+
"properties": {
|
|
657
|
+
"audience": {
|
|
658
|
+
"type": "string"
|
|
659
|
+
},
|
|
660
|
+
"claims": {
|
|
661
|
+
"type": "object"
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
]
|
|
666
|
+
},
|
|
667
|
+
"include": {
|
|
668
|
+
"type": "array",
|
|
669
|
+
"items": {
|
|
670
|
+
"type": "string"
|
|
671
|
+
},
|
|
672
|
+
"description": "CLI only: scenario files to run (default **/*.scenario.{yaml,yml})"
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
}
|