MCPcopy Create free account
hub / github.com/compose-spec/compose-go / TestValidateUndefinedTopLevelOption

Function TestValidateUndefinedTopLevelOption

schema/schema_test.go:42–53  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

40}
41
42func TestValidateUndefinedTopLevelOption(t *testing.T) {
43 config := map[string]any{
44 "helicopters": map[string]any{
45 "foo": map[string]any{
46 "image": "busybox",
47 },
48 },
49 }
50
51 err := Validate(config)
52 assert.ErrorContains(t, err, "additional properties 'helicopters' not allowed")
53}
54
55func TestValidateAllowsXTopLevelFields(t *testing.T) {
56 config := map[string]any{

Callers

nothing calls this directly

Calls 1

ValidateFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…