mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-13 19:33:55 +03:00
server: Document and update HIE file for haskell integration suite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3215 GitOrigin-RevId: 006789ae185f31a34740780d6ddeb0a68bcdbb5d
This commit is contained in:
parent
f0bef2b482
commit
babdd61ad7
@ -8,6 +8,8 @@ cradle:
|
||||
component: "graphql-engine:test:graphql-engine-tests"
|
||||
- path: "./server/src-bench-cache"
|
||||
component: "graphql-engine:bench:cache"
|
||||
- path: "./server/test"
|
||||
- path: "./server/tests/integration"
|
||||
component: "graphql-engine:test:graphql-engine-integration-tests"
|
||||
- path: "server/tests-hspec"
|
||||
component: "graphql-engine:test:tests-hspec"
|
||||
|
||||
|
@ -120,9 +120,15 @@ This will launch a server on port 8080, and it will serve the console assets if
|
||||
|
||||
1. A small set of unit tests and integration tests written in Haskell, in `server/src-test`.
|
||||
|
||||
2. An extensive set of end-to-end tests written in Python, in `server/tests-py`.
|
||||
2. A new integration test suite written in Haskell, in `server/tests-hspec`.
|
||||
|
||||
Both sets of tests require a running Postgres database.
|
||||
3. An extensive set of end-to-end tests written in Python, in `server/tests-py`.
|
||||
|
||||
All sets of tests require running databases:
|
||||
|
||||
- some unit tests hit the database, and running the unit test suite requires passing in a postgres connection string,
|
||||
- the Haskell integration test suite requires databases to run (they can be started via the docker command listed below),
|
||||
- the Python integration test suite also requires databases AND the engine to be running, which can be started via either the `dev.sh` script, or manually.
|
||||
|
||||
##### Running the Haskell test suite
|
||||
|
||||
@ -132,6 +138,20 @@ HASURA_GRAPHQL_DATABASE_URL='postgres://<user>:<password>@<host>:<port>/<dbname>
|
||||
cabal new-run -- test:graphql-engine-tests postgres
|
||||
```
|
||||
|
||||
##### Running the Haskell integration test suite
|
||||
|
||||
1. To run the Haskell integration test suite, you'll first need to bring up the database containers:
|
||||
|
||||
```sh
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
2. Once the containers are up, you can run the test suite via
|
||||
|
||||
```sh
|
||||
cabal test tests-hspec --test-show-details=direct
|
||||
```
|
||||
|
||||
##### Running the Python test suite
|
||||
|
||||
1. To run the Python tests, you’ll need to install the necessary Python dependencies first. It is recommended that you do this in a self-contained Python venv, which is supported by Python 3.3+ out of the box. To create one, run:
|
||||
|
Loading…
Reference in New Issue
Block a user