Skip to content

Commit f396d0e

Browse files
test(extras): cover RECEIVE_URL branch in runResourceDetail (#15)
The golangci-lint patch (#9) touched cmd/extras.go:195 (the `detail.ReceiveURL != ""` Fprintf branch), which the 100%-patch-coverage gate then flagged as uncovered — the human-output success test sent a payload without `receive_url`, and the JSON test takes the early encode-return path before reaching that line. Add `receive_url` to the human-output success fixture so the branch executes. No production code change. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 47144e8 commit f396d0e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cmd/extras_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ func TestRunResourceDetail_Success_HumanOutput(t *testing.T) {
9797
_, _ = w.Write([]byte(`{
9898
"token":"tok","id":"id-1","resource_type":"postgres","name":"app",
9999
"env":"production","tier":"pro","status":"active",
100-
"connection_url":"postgres://u:p@x/db","created_at":"2026-01-01",
101-
"expires_at":"2026-12-31"
100+
"connection_url":"postgres://u:p@x/db",
101+
"receive_url":"https://hooks.instanode.dev/tok",
102+
"created_at":"2026-01-01","expires_at":"2026-12-31"
102103
}`))
103104
}))
104105
defer srv.Close()

0 commit comments

Comments
 (0)