MCPcopy Create free account
hub / github.com/docker/docker-agent / TestMultiProviderEmptyValue

Function TestMultiProviderEmptyValue

pkg/environment/multi_test.go:37–47  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

35}
36
37func TestMultiProviderEmptyValue(t *testing.T) {
38 t.Parallel()
39 firstProvider := NewEnvListProvider([]string{"MY_VAR="})
40 secondProvider := NewEnvListProvider([]string{"MY_VAR=fallback"})
41
42 provider := NewMultiProvider(firstProvider, secondProvider)
43 value, found := provider.Get(t.Context(), "MY_VAR")
44
45 assert.True(t, found)
46 assert.Empty(t, value)
47}
48
49type neverFound struct{}
50

Callers

nothing calls this directly

Calls 4

GetMethod · 0.95
NewEnvListProviderFunction · 0.85
NewMultiProviderFunction · 0.85
ContextMethod · 0.80

Tested by

no test coverage detected