MCPcopy Index your code
hub / github.com/docker/docker-agent / TestLookupCommand_URLTarget

Function TestLookupCommand_URLTarget

pkg/runtime/commands_test.go:667–683  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

665}
666
667func TestLookupCommand_URLTarget(t *testing.T) {
668 t.Parallel()
669
670 rt := &mockRuntime{
671 commands: types.Commands{
672 "feedback": types.Command{
673 Description: "Open the feedback site",
674 URL: "https://example.com/feedback",
675 },
676 },
677 }
678
679 cmd, _, ok := LookupCommand(t.Context(), rt, "/feedback")
680 assert.True(t, ok)
681 assert.Equal(t, "https://example.com/feedback", cmd.URL)
682 assert.Empty(t, cmd.Instruction)
683}
684
685func TestLookupCommand_NotACommand(t *testing.T) {
686 t.Parallel()

Callers

nothing calls this directly

Calls 2

LookupCommandFunction · 0.85
ContextMethod · 0.80

Tested by

no test coverage detected