History

fix tests

Rhys Sullivan committed 8 months ago

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

Showing the changes to packages/platform/control-plane (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
396396 const executeHttpPlan = (requestPlan: HttpInvocationRequestPlan) =>
397397 Effect.tryPromise({
398398 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;
399405 const response = await fetch(requestPlan.url, {
400406 method: requestPlan.method,
401407 headers: requestPlan.headers,
402− ...(requestPlan.body !== undefined ? { body: requestPlan.body } : {}),
408+ ...(body !== undefined ? { body } : {}),
403409 });
404410 const responseBody = await decodeFetchBody(response);
405411 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
5757 const FIXTURE_WORKSPACE_ID = WorkspaceIdSchema.make("ws_source_fixture_matrix");
5858
5959 const readFixture = (name: string): string =>
60− readFileSync(new URL(`./fixtures/${name}`, import.meta.url), "utf8");
60+ readFileSync(new URL(`../fixtures/${name}`, import.meta.url), "utf8");
6161
6262 const makeSource = (input: {
6363 id: string;