MCPcopy
hub / github.com/docker/docker-agent / TestResolveSources_URLReference

Function TestResolveSources_URLReference

pkg/config/sources_test.go:660–673  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

658}
659
660func TestResolveSources_URLReference(t *testing.T) {
661 t.Parallel()
662
663 testURL := "https://example.com/agent.yaml"
664 sources, err := ResolveSources(testURL, nil)
665 require.NoError(t, err)
666 require.Len(t, sources, 1)
667
668 // The key should be the URL-encoded version
669 expectedKey := url.QueryEscape(testURL)
670 source, ok := sources[expectedKey]
671 require.True(t, ok)
672 assert.Equal(t, testURL, source.Name())
673}
674
675func TestURLSource_Read_WithGitHubAuth(t *testing.T) {
676 t.Parallel()

Callers

nothing calls this directly

Calls 3

ResolveSourcesFunction · 0.85
LenMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected