Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions pkgs/mcpx/internal/e2e/cli_burndown_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package e2e_test

import (
"strings"
"testing"
)

// Burn-down exercises for #8462: the cli discovery group (batch,
// list, namespaces) carried feature-coverage exemptions instead of
// integration tests. Each test below runs the real command through
// the e2e harness against a live daemon, which is what records the
// feature's ledger row; the exemption lines are deleted with them,
// and the coverage guard fails if a covered feature keeps one.

// TestBatchRunsCallsThroughTheCLI exercises `mcpx batch`: several
// tool calls in one turn, no JavaScript runtime, results rendered
// per call.
func TestBatchRunsCallsThroughTheCLI(t *testing.T) {
e := newEnv(t, oneServer)
out := e.run("batch", "-c", `[{"server":"demo","tool":"echo","args":{"message":"first"}},{"server":"demo","tool":"echo","args":{"message":"second"}}]`)
for _, want := range []string{"first", "second"} {
if !strings.Contains(out, want) {
t.Fatalf("batch output missing %q:\n%s", want, out)
}
}
}

// TestListAliasListsNamespaces exercises `mcpx list`, the long alias
// of ls: it must show the configured namespace and its description.
func TestListAliasListsNamespaces(t *testing.T) {
e := newEnv(t, oneServer)
out := e.run("list")
if !strings.Contains(out, "demo") || !strings.Contains(out, "a fake server") {
t.Fatalf("list should show the demo namespace and its description:\n%s", out)
}
}

// TestNamespacesAliasListsNamespaces exercises `mcpx namespaces`,
// the descriptive alias of ls, with the same expectation.
func TestNamespacesAliasListsNamespaces(t *testing.T) {
e := newEnv(t, oneServer)
out := e.run("namespaces")
if !strings.Contains(out, "demo") || !strings.Contains(out, "a fake server") {
t.Fatalf("namespaces should show the demo namespace and its description:\n%s", out)
}
}
3 changes: 0 additions & 3 deletions pkgs/mcpx/internal/e2e/feature_coverage_exemptions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ cli reload no integration-test exercise yet; burn-down #8461 (cli daemon group)
cli stdio-proxy no integration-test exercise yet; burn-down #8461 (cli daemon group)
cli supervise no integration-test exercise yet; burn-down #8461 (cli daemon group)
cli upgrade no integration-test exercise yet; burn-down #8461 (cli daemon group)
cli batch no integration-test exercise yet; burn-down #8462 (cli discovery group)
cli list no integration-test exercise yet; burn-down #8462 (cli discovery group)
cli namespaces no integration-test exercise yet; burn-down #8462 (cli discovery group)
cli dashboard no integration-test exercise yet; burn-down #8463 (cli inspection group)
cli explore no integration-test exercise yet; burn-down #8463 (cli inspection group)
cli hook no integration-test exercise yet; burn-down #8463 (cli inspection group)
Expand Down