MCPcopy Create free account
hub / github.com/JordanCoin/codemap / TestRunPluginInstall

Function TestRunPluginInstall

cmd/plugin_test.go:10–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestRunPluginInstall(t *testing.T) {
11 home := t.TempDir()
12
13 out := captureOutput(func() {
14 RunPlugin([]string{"install", "--home", home})
15 })
16
17 checks := []string{
18 "codemap plugin install",
19 "Plugin:",
20 "Marketplace:",
21 "Marketplace entry: created",
22 }
23 for _, check := range checks {
24 if !strings.Contains(out, check) {
25 t.Fatalf("expected output to contain %q, got:\n%s", check, out)
26 }
27 }
28
29 pluginJSON := filepath.Join(home, "plugins", "codemap", ".codex-plugin", "plugin.json")
30 if _, err := os.Stat(pluginJSON); err != nil {
31 t.Fatalf("expected installed plugin manifest to exist: %v", err)
32 }
33}

Callers

nothing calls this directly

Calls 2

captureOutputFunction · 0.85
RunPluginFunction · 0.85

Tested by

no test coverage detected