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

Function TestMultiProviderDelegate

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

Source from the content-addressed store, hash-verified

17}
18
19func TestMultiProviderDelegate(t *testing.T) {
20 t.Parallel()
21 provider := NewMultiProvider(&alwaysFound{}, &neverFound{})
22 value, found := provider.Get(t.Context(), "TEST2")
23
24 assert.Equal(t, "FOUND", value)
25 assert.True(t, found)
26}
27
28func TestMultiProviderTryInOrder(t *testing.T) {
29 t.Parallel()

Callers

nothing calls this directly

Calls 3

GetMethod · 0.95
NewMultiProviderFunction · 0.85
ContextMethod · 0.80

Tested by

no test coverage detected