test: define the writeJSON helper the corecmd stub handlers call · Entire
test: define the writeJSON helper the corecmd stub handlers call
00f1f52·
Soph·1w ago·1 file·+8 added/-0 removed
PR #1626 landed corecmd_list_test.go / corecmd_mutation_test.go calling a writeJSON helper that was never defined anywhere in the package, so main's Lint (typecheck) and Tests jobs are red and every open PR inherits the failure from the merge preview.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Sessions
876de296c7bdView transcript
[?
Multi-cell Fan-out and Cell Routing InfrastructureClaude Code·Fable 5·4 steps](/content/gh/entireio/cli/session/47b22b6e-eadc-4e6e-a6d3-01cee9413422#timeline-876de296c7bd/index.html)
Changes
1
cmd/entire/cli
Mcorecmd_test.go+8
2 unmodified lines
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2 unmodified lines
import (
\t"bytes"
\t"context"
\t"encoding/json"
\t"errors"
\t"fmt"
\t"io"
\t"strings"
\t"testing"
)
// writeJSON encodes v as JSON to w — the response helper the stub control-plane
// handlers in the corecmd tests share.
func writeJSON(w io.Writer, v any) error {
\treturn json.NewEncoder(w).Encode(v)
}
// TestConfirmControlPlaneDeletion covers the non-TTY decision paths of the
// destructive-delete gate. The interactive form path needs a real terminal and
// is left to manual/e2e coverage.
Mcmd/entire/cli/corecmd_test.go+8