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

Function TestUnsupportedProperties

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

Source from the content-addressed store, hash-verified

762}
763
764func TestUnsupportedProperties(t *testing.T) {
765 dict, err := ParseYAML([]byte(`
766version: "3"
767services:
768 web:
769 image: web
770 build:
771 context: ./web
772 links:
773 - bar
774 pid: host
775 db:
776 image: db
777 build:
778 context: ./db
779`))
780 assert.NilError(t, err)
781
782 configDetails := buildConfigDetails(dict, nil)
783
784 _, err = Load(configDetails)
785 assert.NilError(t, err)
786
787 unsupported := GetUnsupportedProperties(dict)
788 assert.Check(t, is.DeepEqual([]string{"build", "links", "pid"}, unsupported))
789}
790
791func TestDiscardEnvFileOption(t *testing.T) {
792 dict, err := ParseYAML([]byte(`version: "3"

Callers

nothing calls this directly

Calls 4

ParseYAMLFunction · 0.85
buildConfigDetailsFunction · 0.85
GetUnsupportedPropertiesFunction · 0.85
LoadFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…