Samir Talwar
a24cdd9b49
Prepare PostgreSQL for running tests in parallel.
...
This makes two changes to the Docker Compose files that we use for local testing:
1. We disable `fsync`. On my machine, this decreases the time taken to create a new database from ~5s to less than 0.1s. The trade-off is that you might lose data, which we don't care about, as this is for testing.
2. We increase the maximum number of connections from the default, 100, to 1000. This allows us to run more tests in parallel without hitting connection limits.
These changes won't have any meaningful effect for now; they simply allow us to parallelize tests against PostgreSQL in the future.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5892
GitOrigin-RevId: 5d0d0ab37fdfbf4c9e20084d3cbedf647f54a04e
2022-09-15 14:03:23 +00:00
Lyndon Maydwell
ba0a685211
CI Support for Data Connector Agent Tests - GDW-336
...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5808
GitOrigin-RevId: 817575185cdbd21985c647f22d5b643ce0852ef6
2022-09-15 09:47:24 +00:00
Daniel Harvey
7d86a5d231
tests: use newest CockroachDB image in docker-compose.yml
...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5764
GitOrigin-RevId: 36e3043c80bbda09c69e9b34ef14c64993d89662
2022-09-07 06:17:03 +00:00
Lyndon Maydwell
cd6fe41b99
SQLite Data Connectors HSpec Tests - GDW-183
...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5731
GitOrigin-RevId: 0af22a85bd6b1cb8888562e05cde640047e56b41
2022-09-07 03:43:32 +00:00
Daniel Chambers
97b0e4c591
Move Typescript types for Data Connector agent into their own package
...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5596
GitOrigin-RevId: c5da90eb4e61a9d9a5ddc34f7bfbaa2d00c698b8
2022-09-05 06:09:23 +00:00
Gil Mizrahi
5aab7e5ce9
add cockroach to docker compose and tests-hspec
...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5558
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: b7f242939e718d5bb4f22b11c093ae77d21cdcce
2022-08-25 17:18:40 +00:00
Daniel Chambers
4d9aa3a78d
Fix SQLite Agent port conflict with Data Connector mock agent
...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5440
GitOrigin-RevId: 1872c9021d641407abc8ce2a9e8693dbcf1adb1e
2022-08-11 03:22:32 +00:00
Lyndon Maydwell
fc907201a0
Sqlite reference agent
...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5263
Co-authored-by: Daniel Chambers <1214352+daniel-chambers@users.noreply.github.com>
GitOrigin-RevId: fb5cf3cb80ab59cd5ee0d064e3f776c062856aa3
2022-08-05 07:12:51 +00:00
Samir Talwar
c0a0a5fe87
docker: Mount database data directories as named volumes.
...
I'm trying to shore up the Python integration tests to make them more reliable. In doing so, I noticed this.
---
This ensures that the data directories are always in a mutable file system, and not going through overlayfs.
In my testing, this sped up PostgreSQL database initialization a lot. In particular, `CREATE DATABASE` commands went from > 5s to < 0.1s.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5248
GitOrigin-RevId: 5104aea32c92559c323803020d727bebfdafb8e6
2022-08-04 10:11:10 +00:00
Samir Talwar
349ccd3296
Use docker compose
, not docker-compose
.
...
Docker Compose is now a plugin for Docker, bundled by default in Docker Desktop and many Linux distribution packages. The standalone `docker-compose` binary has been deprecated since Docker Compose v2.
Using the new version directly allows us to write development scripts that do not require `docker-compose` to be installed.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5185
GitOrigin-RevId: c8542b8b2405d1aa32288991688c6fde4af96383
2022-08-02 10:30:57 +00:00
Samir Talwar
e1c7767d5e
Run both integration test suites against PostgresSQL v14 with Postgis.
...
Let's be consistent about this.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5177
GitOrigin-RevId: 75a48452984a0762e52ee251a98f086f2ae1b150
2022-07-25 16:37:54 +00:00
Daniel Chambers
d896cc4d95
Replace Haskell DC Reference Agent with TypeScript DC Reference Agent in HSpec tests
...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4689
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: 9dc6a2e373b3d7ab0bdce7ddcd7b7e6e5b1dc498
2022-06-23 08:09:46 +00:00
Gil Mizrahi
b091c75372
Add README.md to tests-hspec and reorganize module namespace
...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3421
GitOrigin-RevId: 8802d7e6a360edee62011ef371cc8930f36b25b1
2022-01-21 07:49:31 +00:00
Chris Done
15071a3bc9
Add SQL Server & Citus to hspec test suite harness and a BasicFields test for each
...
Relates to https://github.com/hasura/graphql-engine/issues/7755
This includes:
1. SQL Server
2. Citus
And removes the persistent-based testing in favor of duplicating the schema setup, data insertion and teardown.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3030
Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
GitOrigin-RevId: ab03e68436d2ae07a9ddeb5a499ff41e48d0e2d6
2021-12-30 11:01:43 +00:00
Chris Done
926da74819
Auto-launch graphql-engine ( close hasura/graphql-engine#7801 , hasura/graphql-engine#7827 )
...
Dupe of https://github.com/hasura/graphql-engine-mono/pull/2853 with branch renamed so it doesn't break a tool.
prev pr: https://github.com/hasura/graphql-engine-mono/pull/2911
next pr: https://github.com/hasura/graphql-engine-mono/pull/2922
This implements https://github.com/hasura/graphql-engine/issues/7801
Some points to keep in mind for review:
* How state is passed to the tests. Do we like how this works?
* I quite like it, with the opaque type [`State`](68f33051ca/server/tests-hspec/Harness/State.hs (L17)
), we can avoid churn when adding things.
* The [setup/teardown](68f33051ca/server/tests-hspec/Spec.hs (L19-L31)
) seems clean.
* By using hspec's own means to pass and denote context, we avoid "getting new ideas" for how to structure the tests -- we use a standard. Hopefully, that means the tests' structure rarely change.
* The various flags passed in the [ServeOptions](68f33051ca/server/tests-hspec/Harness/Constants.hs (L123)
) - if there are any causes for concern, raise them here. My thinking is that, there are lots. I've picked some "sane" defaults (mostly empty). The tests pass. I think as we add more complex tests, these flags will be scrutinised and updated as needed. I think it's valuable that all flags are explicitly listed here, though.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2921
GitOrigin-RevId: 2c2e70bf784ef571a48509a7e5006fd0f48773b5
2021-11-23 18:16:15 +00:00