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

Function TestValidateUndefinedTopLevelOption

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

Source from the content-addressed store, hash-verified

136}
137
138func TestValidateUndefinedTopLevelOption(t *testing.T) {
139 config := dict{
140 "version": "3.0",
141 "helicopters": dict{
142 "foo": dict{
143 "image": "busybox",
144 },
145 },
146 }
147
148 err := Validate(config, "3.0")
149 assert.ErrorContains(t, err, "Additional property helicopters is not allowed")
150}
151
152func TestValidateAllowsXTopLevelFields(t *testing.T) {
153 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…