From fc565d503df944cf8dda8245aa73779463061fb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adnan=20Rahi=C4=87?= Date: Tue, 13 Feb 2024 14:30:17 +0100 Subject: [PATCH] docs(vercel): add prod env vars and test (#3632) docs(vercel): add prod env vars and test (todo: fix breaking deployment) --- .../.env.prod | 11 +++++++++++ .../test/api.pokemon.spec.prod.yaml | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 examples/integration-testing-vercel-functions/.env.prod create mode 100644 examples/integration-testing-vercel-functions/test/api.pokemon.spec.prod.yaml diff --git a/examples/integration-testing-vercel-functions/.env.prod b/examples/integration-testing-vercel-functions/.env.prod new file mode 100644 index 0000000000..fbed8a49c6 --- /dev/null +++ b/examples/integration-testing-vercel-functions/.env.prod @@ -0,0 +1,11 @@ +# OTLP HTTP +OTEL_EXPORTER_OTLP_ENDPOINT="https://.tracetest.io:443" + +# Vercel Postgres +POSTGRES_DATABASE="**********" +POSTGRES_HOST="**********" +POSTGRES_PASSWORD="**********" +POSTGRES_PRISMA_URL="**********" +POSTGRES_URL="**********" +POSTGRES_URL_NON_POOLING="**********" +POSTGRES_USER="**********" diff --git a/examples/integration-testing-vercel-functions/test/api.pokemon.spec.prod.yaml b/examples/integration-testing-vercel-functions/test/api.pokemon.spec.prod.yaml new file mode 100644 index 0000000000..8769d49863 --- /dev/null +++ b/examples/integration-testing-vercel-functions/test/api.pokemon.spec.prod.yaml @@ -0,0 +1,18 @@ +type: Test +spec: + id: p00W82OIR + name: Test API + trigger: + type: http + httpRequest: + method: GET + url: https://integration-testing-nextjs-vercel-functions.vercel.app/api/pokemon + body: "{\n \"id\": \"6\"\n}" + headers: + - key: Content-Type + value: application/json + specs: + - selector: span[tracetest.span.type="http"] + name: "All HTTP Spans: Status code is 200" + assertions: + - attr:http.status_code = 200