MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / TestRedactCommunityScriptEnv

Function TestRedactCommunityScriptEnv

internal/cli/community_scripts_test.go:45–55  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

43}
44
45func TestRedactCommunityScriptEnv(t *testing.T) {
46 env := redactCommunityScriptEnv([]core.EnvOverride{
47 {Name: "var_hostname", Value: "grafana"},
48 {Name: "var_pw", Value: "secret"},
49 {Name: "var_github_token", Value: "ghp_secret"},
50 })
51
52 require.Equal(t, "grafana", env[0].Value)
53 require.Equal(t, "[redacted]", env[1].Value)
54 require.Equal(t, "[redacted]", env[2].Value)
55}
56
57func TestDetectCreatedGuests(t *testing.T) {
58 before := []*api.VM{

Callers

nothing calls this directly

Calls 1

redactCommunityScriptEnvFunction · 0.85

Tested by

no test coverage detected