Skip to content

Commit dd3aa96

Browse files
authored
test(httpapi): cover more safe GET parity (#25217)
1 parent 8b56d17 commit dd3aa96

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

packages/opencode/test/server/httpapi-json-parity.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { FilePaths } from "../../src/server/routes/instance/httpapi/groups/file"
99
import { GlobalPaths } from "../../src/server/routes/instance/httpapi/groups/global"
1010
import { InstancePaths } from "../../src/server/routes/instance/httpapi/groups/instance"
1111
import { McpPaths } from "../../src/server/routes/instance/httpapi/groups/mcp"
12+
import { PtyPaths } from "../../src/server/routes/instance/httpapi/groups/pty"
1213
import { SessionPaths } from "../../src/server/routes/instance/httpapi/groups/session"
1314
import { MessageID, PartID } from "../../src/session/schema"
1415
import { Session } from "@/session/session"
@@ -121,6 +122,7 @@ describe("HttpApi JSON parity", () => {
121122
yield* Effect.forEach(
122123
[
123124
{ label: "global.health", path: GlobalPaths.health, headers: {} },
125+
{ label: "global.config", path: GlobalPaths.config, headers: {} },
124126
{ label: "instance.path", path: InstancePaths.path, headers },
125127
{ label: "instance.vcs", path: InstancePaths.vcs, headers },
126128
{ label: "instance.vcsDiff", path: `${InstancePaths.vcsDiff}?mode=git`, headers },
@@ -135,7 +137,11 @@ describe("HttpApi JSON parity", () => {
135137
{ label: "project.current", path: "/project/current", headers },
136138
{ label: "provider.list", path: "/provider", headers },
137139
{ label: "provider.auth", path: "/provider/auth", headers },
140+
{ label: "permission.list", path: "/permission", headers },
141+
{ label: "question.list", path: "/question", headers },
138142
{ label: "mcp.status", path: McpPaths.status, headers },
143+
{ label: "pty.shells", path: PtyPaths.shells, headers },
144+
{ label: "pty.list", path: PtyPaths.list, headers },
139145
{ label: "file.list", path: `${FilePaths.list}?${new URLSearchParams({ path: "." })}`, headers },
140146
{
141147
label: "file.content",
@@ -162,6 +168,7 @@ describe("HttpApi JSON parity", () => {
162168
{ label: "experimental.consoleOrgs", path: ExperimentalPaths.consoleOrgs, headers },
163169
{ label: "experimental.toolIDs", path: ExperimentalPaths.toolIDs, headers },
164170
{ label: "experimental.worktree", path: ExperimentalPaths.worktree, headers },
171+
{ label: "experimental.resource", path: ExperimentalPaths.resource, headers },
165172
],
166173
(input) => expectJsonParity({ ...input, legacy, httpapi }),
167174
{ concurrency: 1 },

0 commit comments

Comments
 (0)