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

Function TestLoadExtras

cli/compose/loader/loader_test.go:249–264  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

247}
248
249func TestLoadExtras(t *testing.T) {
250 actual, err := loadYAML(`
251version: "3.7"
252services:
253 foo:
254 image: busybox
255 x-foo: bar`)
256 assert.NilError(t, err)
257 assert.Check(t, is.Len(actual.Services, 1))
258 service := actual.Services[0]
259 assert.Check(t, is.Equal("busybox", service.Image))
260 extras := map[string]any{
261 "x-foo": "bar",
262 }
263 assert.Check(t, is.DeepEqual(extras, service.Extras))
264}
265
266func TestLoadV31(t *testing.T) {
267 actual, err := loadYAML(`

Callers

nothing calls this directly

Calls 2

loadYAMLFunction · 0.85
LenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…