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

Function TestSetEnv

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

Source from the content-addressed store, hash-verified

15)
16
17func TestSetEnv(t *testing.T) {
18 a := assert.New(t)
19 ctx := context.Background()
20 rc := new(RunContext)
21 rc.Env = map[string]string{"ACTIONS_ALLOW_UNSECURE_COMMANDS": "true"}
22 handler := rc.commandHandler(ctx)
23
24 handler("::set-env name=x::valz\n")
25 a.Equal("valz", rc.Env["x"])
26}
27
28func TestSetEnvBlocked(t *testing.T) {
29 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…