Skip to content

Commit bbb95c7

Browse files
Discard changes to apps/desktop/src/ipc/methods/sshEnvironment.test.ts
1 parent 83e0a84 commit bbb95c7

1 file changed

Lines changed: 0 additions & 36 deletions

File tree

‎apps/desktop/src/ipc/methods/sshEnvironment.test.ts‎

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { HttpClient, HttpClientRequest, HttpClientResponse } from "effect/unstab
1010
import {
1111
DesktopSshEnvironmentRequestError,
1212
fetchSshEnvironmentDescriptor,
13-
fetchSshSessionState,
1413
} from "./sshEnvironment.ts";
1514

1615
function jsonResponse(request: HttpClientRequest.HttpClientRequest, body: unknown, status = 200) {
@@ -113,39 +112,4 @@ describe("SSH environment IPC", () => {
113112
assert.equal(requestCount, 0);
114113
}).pipe(Effect.provide(layer));
115114
});
116-
117-
it.effect("preserves SSH HTTP status in top-level request error messages", () => {
118-
const layer = makeHttpClientLayer((request) =>
119-
Effect.succeed(
120-
jsonResponse(
121-
request,
122-
{
123-
_tag: "EnvironmentAuthInvalidError",
124-
code: "auth_invalid",
125-
reason: "invalid_credential",
126-
traceId: "11111111111111111111111111111111",
127-
},
128-
401,
129-
),
130-
),
131-
);
132-
133-
return Effect.gen(function* () {
134-
const exit = yield* Effect.exit(
135-
fetchSshSessionState.handler({
136-
bearerToken: "stale-bearer-token",
137-
httpBaseUrl: "http://127.0.0.1:41773/",
138-
}),
139-
);
140-
assert(Exit.isFailure(exit));
141-
const failure = Cause.findErrorOption(exit.cause);
142-
assert(Option.isSome(failure));
143-
const error = failure.value;
144-
145-
assert.instanceOf(error, DesktopSshEnvironmentRequestError);
146-
assert.equal(error.operation, "fetch-session-state");
147-
assert.equal(error.sshHttpStatus, 401);
148-
assert.match(error.message, /^\[ssh_http:401\] /u);
149-
}).pipe(Effect.provide(layer));
150-
});
151115
});

0 commit comments

Comments
 (0)