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

Function TestLookupCommand_AgentTarget

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

Source from the content-addressed store, hash-verified

646}
647
648func TestLookupCommand_AgentTarget(t *testing.T) {
649 t.Parallel()
650
651 rt := &mockRuntime{
652 commands: types.Commands{
653 "plan": types.Command{
654 Description: "Hand off to the planner",
655 Agent: "planner",
656 },
657 },
658 }
659
660 cmd, rest, ok := LookupCommand(t.Context(), rt, "/plan add a logout button")
661 assert.True(t, ok)
662 assert.Equal(t, "planner", cmd.Agent)
663 assert.Empty(t, cmd.Instruction)
664 assert.Equal(t, "add a logout button", rest)
665}
666
667func TestLookupCommand_URLTarget(t *testing.T) {
668 t.Parallel()

Callers

nothing calls this directly

Calls 2

LookupCommandFunction · 0.85
ContextMethod · 0.80

Tested by

no test coverage detected