Files
directus/tests-blackbox
Pascal Jufer 37faf3bd5d Patch Tuesday 🐸 (#17530)
* Update root deps

* Reformat files with new prettier version

* Update `directus` deps

* Update `@directus/app` deps

* Update `@directus/shared` deps

* Update components snapshots after updates

prop order has changed

* Update `extensions-sdk` deps

* pin version of zod in shared

* Update `@directus/storage` deps

* Update `@directus/storage-driver-azure` deps

* Update `storage-driver-cloudinary` deps

* Update `@directus/storage-driver-cloudinary` deps

* Update `@directus/storage-driver-local` deps

* Update `@directus/storage-driver-s3` deps

* Update `@directus/utils` deps

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-02-16 17:47:39 +08:00
..
2022-12-21 10:04:03 -05:00
2023-02-16 17:47:39 +08:00
2023-01-31 17:36:49 +00:00
2022-12-21 10:04:03 -05:00
2022-07-15 15:25:32 +00:00
2022-12-21 10:04:03 -05:00
2022-07-15 15:25:32 +00:00
2022-12-21 10:04:03 -05:00

Blackbox tests

Setup

Make sure the containers for the databases are running by running docker compose up -d in this folder.

Running tests locally

Run npm run test:blackbox to run the blackbox tests for every supported database vendor.

Testing a specific database

Provide a csv of database drivers in the TEST_DB environment variable to test specific databases:

TEST_DB=cockroachdb npm run test:blackbox

Using an existing Directus instance

The test suite will spin up a fresh copy of the Directus API from the current build. To use an already running copy of Directus, set the TEST_LOCAL flag:

TEST_DB=cockroachdb TEST_LOCAL=true npm run test:blackbox

This will use 127.0.0.1:8055 as the URL for every test. Note: make sure to connect your local Directus database instance to the test database container found in docker-compose in this folder.

Watching for (test) changes

Use npm run test:blackbox:watch to enable Jest's --watch mode, especially useful in combination with the flags above.

This does not watch changes to Directus; it only watches changes to the tests.