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

Function TestValidateAllowsXFields

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

Source from the content-addressed store, hash-verified

160}
161
162func TestValidateAllowsXFields(t *testing.T) {
163 config := dict{
164 "version": "3.7",
165 "services": dict{
166 "bar": dict{
167 "x-extra-stuff": dict{},
168 },
169 },
170 "volumes": dict{
171 "bar": dict{
172 "x-extra-stuff": dict{},
173 },
174 },
175 "networks": dict{
176 "bar": dict{
177 "x-extra-stuff": dict{},
178 },
179 },
180 "configs": dict{
181 "bar": dict{
182 "x-extra-stuff": dict{},
183 },
184 },
185 "secrets": dict{
186 "bar": dict{
187 "x-extra-stuff": dict{},
188 },
189 },
190 }
191 err := Validate(config, "3.7")
192 assert.NilError(t, err)
193}
194
195func TestValidateCredentialSpecs(t *testing.T) {
196 tests := []struct {

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…