MCPcopy Create free account
hub / github.com/docker/cli / TestValidatePlacement

Function TestValidatePlacement

cli/compose/schema/schema_test.go:276–296  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

274type array []any
275
276func TestValidatePlacement(t *testing.T) {
277 config := dict{
278 "version": "3.3",
279 "services": dict{
280 "foo": dict{
281 "image": "busybox",
282 "deploy": dict{
283 "placement": dict{
284 "preferences": array{
285 dict{
286 "spread": "node.labels.az",
287 },
288 },
289 },
290 },
291 },
292 },
293 }
294
295 assert.NilError(t, Validate(config, "3.3"))
296}
297
298func TestValidateIsolation(t *testing.T) {
299 config := dict{

Callers

nothing calls this directly

Calls 1

ValidateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…