fauna / fauna-shell

Interactive shell for FaunaDB
Other
75 stars 17 forks source link

Send Schema body as FormData; Format schema test file #349

Closed mwilde345 closed 3 months ago

mwilde345 commented 3 months ago

Ticket(s): FE-5644

Problem

Schema tests run in the pipeline (but not in CircleCI). They failed: https://concourse.faunadb.net/teams/devex/pipelines/fauna-shell-release/jobs/test/builds/22

Solution

Schema endpoint expects Content-Type: multipart/form-data. We had that in place before, but swept through and updated all fetch calls to use ReadableStream. Just needed to revert back to FormData for the Schema portion.

Also applied some prettier to the schema test file

Result

➜  fsl git:(schema-test-fix) ✗ ./test-script.mjs ~/workplace/fauna-shell/bin/run
Schema tests run successfully!