Files
archived-next-auth/packages/adapter-fauna/tests/test.sh
Nico Domino dc3ad8c408 chore: move adapters to monorepo (#3805)
* feat: move adapters repo to new packages dir

* fix: rm docusaurus build dir

* fix: update .gitignore

* fix: reorganise package directories

* remove package lock files

* fix: folder rename

* remove package lock file

* fix: jest config paths

* update yarn.lock

* ignore dynamodb local bin

* fix: gitignore

* fix: update adapter-test

* change adapter-test package json

* rename prisma adapter package name

* fix paths

* update gitignore

* run tests with one concurrency

* fix: merge conflicts

* gitignore dist folders

* fix: add jest.config.js to tsconfig ignore

* fix: yarn.lock

* fix: ignore pouch in turbo commands

* ignore jest file

* fix: test turbo test cmd

* fix: turbo test cmd

* test: disable mongodb-adapter temporarily

* ignore all dev.db files

* simplify gitignore

* remove unused dependency

* have tsconfig in its own package

* remove unnecessary .gitignore files

* move jest config to preset

* add ts expect error comment

* chore: update .gitignore

* remove babelrc

* don't depend on build for testing in turbo

* fix: cleanup testing npm scripts

* fix: remove jest-config roots

* fix: add fauna jest preset

* fix: rm dev.db from prisma mirgation

* fix prisma

* remove nohoist

Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-02-04 22:40:32 +01:00

29 lines
600 B
Bash
Executable File

#!/usr/bin/env bash
CONTAINER_NAME=next-auth-fauna-test
export FAUNADB_PORT=8443
export FAUNA_ADMIN_KEY=secret
export FAUNADB_DOMAIN=localhost
export FAUNADB_SCHEME=http
# Start db
docker run -d --rm \
--name ${CONTAINER_NAME} \
-p ${FAUNADB_PORT}:${FAUNADB_PORT} \
fauna/faunadb
echo "Waiting 20 sec for db to start..."
sleep 20
# Create tables and indeces
npx fauna-schema-migrate generate
npx fauna-schema-migrate apply all
# Always stop container, but exit with 1 when tests are failing
if npx jest;then
docker stop ${CONTAINER_NAME}
else
docker stop ${CONTAINER_NAME} && exit 1
fi