@@ -136,6 +136,7 @@ func TestNormalizeDependsOn(t *testing.T) {
136136 "bar" : { // explicit depends_on never should be overridden
137137 Condition : types .ServiceConditionHealthy ,
138138 Restart : false ,
139+ Required : true ,
139140 },
140141 },
141142 NetworkMode : "service:zot" ,
@@ -159,6 +160,7 @@ services:
159160 depends_on:
160161 zot:
161162 condition: service_started
163+ required: true
162164 networks:
163165 default: null
164166 volumes_from:
@@ -168,9 +170,11 @@ services:
168170 depends_on:
169171 bar:
170172 condition: service_healthy
173+ required: true
171174 zot:
172175 condition: service_started
173176 restart: true
177+ required: true
174178 network_mode: service:zot
175179 zot:
176180 networks:
@@ -200,19 +204,19 @@ func TestNormalizeImplicitDependencies(t *testing.T) {
200204 Links : []string {"corge" },
201205 DependsOn : map [string ]types.ServiceDependency {
202206 // explicit dependency MUST not be overridden
203- "foo" : {Condition : types .ServiceConditionHealthy , Restart : false },
207+ "foo" : {Condition : types .ServiceConditionHealthy , Restart : false , Required : true },
204208 },
205209 },
206210 },
207211 }
208212
209213 expected := types.DependsOnConfig {
210- "foo" : {Condition : types .ServiceConditionHealthy , Restart : false },
211- "bar" : {Condition : types .ServiceConditionStarted , Restart : true },
212- "baz" : {Condition : types .ServiceConditionStarted , Restart : true },
213- "qux" : {Condition : types .ServiceConditionStarted , Restart : true },
214- "quux" : {Condition : types .ServiceConditionStarted },
215- "corge" : {Condition : types .ServiceConditionStarted , Restart : true },
214+ "foo" : {Condition : types .ServiceConditionHealthy , Restart : false , Required : true },
215+ "bar" : {Condition : types .ServiceConditionStarted , Restart : true , Required : true },
216+ "baz" : {Condition : types .ServiceConditionStarted , Restart : true , Required : true },
217+ "qux" : {Condition : types .ServiceConditionStarted , Restart : true , Required : true },
218+ "quux" : {Condition : types .ServiceConditionStarted , Required : true },
219+ "corge" : {Condition : types .ServiceConditionStarted , Restart : true , Required : true },
216220 }
217221 err := Normalize (& project )
218222 assert .NilError (t , err )
0 commit comments