File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -314,6 +314,12 @@ configs:
314
314
external: true
315
315
x-config-ext: config
316
316
services:
317
+ another:
318
+ image: busybox
319
+ depends_on:
320
+ foo:
321
+ condition: service_started
322
+ x-depends-on: depends
317
323
foo:
318
324
image: busybox
319
325
x-foo: bar
@@ -325,7 +331,7 @@ services:
325
331
assert .Check (t , is .DeepEqual (types.Extensions {
326
332
"x-project" : "project" ,
327
333
}, actual .Extensions ))
328
- assert .Check (t , is .Len (actual .Services , 1 ))
334
+ assert .Check (t , is .Len (actual .Services , 2 ))
329
335
service := actual .Services ["foo" ]
330
336
assert .Check (t , is .Equal ("busybox" , service .Image ))
331
337
@@ -341,6 +347,11 @@ services:
341
347
assert .Check (t , is .DeepEqual (types.Extensions {
342
348
"x-healthcheck" : "health" ,
343
349
}, service .HealthCheck .Extensions ))
350
+
351
+ another := actual .Services ["another" ]
352
+ assert .Check (t , is .DeepEqual (types.Extensions {
353
+ "x-depends-on" : "depends" ,
354
+ }, another .DependsOn ["foo" ].Extensions ))
344
355
}
345
356
346
357
func TestLoadExtends (t * testing.T ) {
Original file line number Diff line number Diff line change 197
197
"^[a-zA-Z0-9._-]+$" : {
198
198
"type" : " object" ,
199
199
"additionalProperties" : false ,
200
+ "patternProperties" : {"^x-" : {}},
200
201
"properties" : {
201
202
"restart" : {"type" : [" boolean" , " string" ]},
202
203
"required" : {
You can’t perform that action at this time.
0 commit comments