MCPcopy Index your code
hub / github.com/docker/cli / TestUpdateEnvironmentWithDuplicateKeys

Function TestUpdateEnvironmentWithDuplicateKeys

cli/command/service/update_test.go:162–172  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

160}
161
162func TestUpdateEnvironmentWithDuplicateKeys(t *testing.T) {
163 // Test case for #25404
164 flags := newUpdateCommand(nil).Flags()
165 flags.Set("env-add", "A=b")
166
167 envs := []string{"A=c"}
168
169 updateEnvironment(flags, &envs)
170 assert.Assert(t, is.Len(envs, 1))
171 assert.Check(t, is.Equal("A=b", envs[0]))
172}
173
174func TestUpdateGroups(t *testing.T) {
175 flags := newUpdateCommand(nil).Flags()

Callers

nothing calls this directly

Calls 4

newUpdateCommandFunction · 0.70
updateEnvironmentFunction · 0.70
SetMethod · 0.45
LenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…