MCPcopy
hub / github.com/nektos/act / TestAddpath

Function TestAddpath

pkg/runner/command_test.go:68–80  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

66}
67
68func TestAddpath(t *testing.T) {
69 a := assert.New(t)
70 ctx := context.Background()
71 rc := new(RunContext)
72 rc.Env = map[string]string{"ACTIONS_ALLOW_UNSECURE_COMMANDS": "true"}
73 handler := rc.commandHandler(ctx)
74
75 handler("::add-path::/zoo\n")
76 a.Equal("/zoo", rc.ExtraPath[0])
77
78 handler("::add-path::/boo\n")
79 a.Equal("/boo", rc.ExtraPath[0])
80}
81
82func TestAddPathBlocked(t *testing.T) {
83 a := assert.New(t)

Callers

nothing calls this directly

Calls 1

commandHandlerMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…