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

Function TestConvertEnvironmentWhenNilValueExists

cli/compose/convert/service_test.go:82–89  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

80}
81
82func TestConvertEnvironmentWhenNilValueExists(t *testing.T) {
83 source := map[string]*string{
84 "key": strPtr("value"),
85 "keyWithNoValue": nil,
86 }
87 env := convertEnvironment(source)
88 assert.Check(t, is.DeepEqual([]string{"key=value", "keyWithNoValue"}, env))
89}
90
91func TestConvertExtraHosts(t *testing.T) {
92 source := composetypes.HostsList{

Callers

nothing calls this directly

Calls 2

convertEnvironmentFunction · 0.85
strPtrFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…