History

fix tests

Rhys Sullivan committed 8 months ago

Commit bbd71fa1 parent 644615b6 files · +42 −25Browse files

Showing the changes to packages/platform (2 of 6 files). Show all

Unified · Split

2 files
  1. packages/platform/control-plane/src/runtime/execution/ir-execution.ts +7 −1
  2. packages/platform/control-plane/src/runtime/sources/source-adapter-fixture-matrix.test.ts +1 −1
packages/platform/control-plane/src/runtime/execution/ir-execution.ts+7−1
@@ -396,10 +396,16 @@ const planHttpInvocation = (input: { · 395 unmodified lines
396const executeHttpPlan = (requestPlan: HttpInvocationRequestPlan) =>396const executeHttpPlan = (requestPlan: HttpInvocationRequestPlan) =>
397 Effect.tryPromise({397 Effect.tryPromise({
398 try: async () => {398 try: async () => {
399 const body =
400 requestPlan.body === undefined
401 ? undefined
402 : typeof requestPlan.body === "string"
403 ? requestPlan.body
404 : new Uint8Array(requestPlan.body).buffer;
399 const response = await fetch(requestPlan.url, {405 const response = await fetch(requestPlan.url, {
400 method: requestPlan.method,406 method: requestPlan.method,
401 headers: requestPlan.headers,407 headers: requestPlan.headers,
402 ...(requestPlan.body !== undefined ? { body: requestPlan.body } : {}),408 ...(body !== undefined ? { body } : {}),
403 });409 });
404 const responseBody = await decodeFetchBody(response);410 const responseBody = await decodeFetchBody(response);
405 return executionEnvelope({411 return executionEnvelope({
packages/platform/control-plane/src/runtime/sources/source-adapter-fixture-matrix.test.ts+1−1
@@ -57,7 +57,7 @@ import { · 56 unmodified lines
57const FIXTURE_WORKSPACE_ID = WorkspaceIdSchema.make("ws_source_fixture_matrix");57const FIXTURE_WORKSPACE_ID = WorkspaceIdSchema.make("ws_source_fixture_matrix");
58 58
59const readFixture = (name: string): string =>59const readFixture = (name: string): string =>
60 readFileSync(new URL(`./fixtures/${name}`, import.meta.url), "utf8");60 readFileSync(new URL(`../fixtures/${name}`, import.meta.url), "utf8");
61 61
62const makeSource = (input: {62const makeSource = (input: {
63 id: string;63 id: string;