Samir Talwar
8b8d7ab96d
server/tests-hspec: Simplifying the steps required to run these on macOS on aarch64.
...
This makes a few changes to the test scripts and makefiles in order to make things simpler for the average Apple user.
First of all, we change the `wait_for_mysql` function to use "localhost", not "127.0.0.1", as this fixed an issue on my system when attempting to connect to the MySQL server.
Secondly, we split the SQL Server test image into two:
* The first is the server itself, which now automatically uses `azure-sql-edge` as the image if you are on an aarch64 chip and using the `make` commands.
* The second is the initialization script. Because `sqlcmd` is not available in the `azure-sql-edge` image on aarch64, we use a separate container based on `mssql-tools` to initialize the server.
The README has been updated.
Tested on both macOS/aarch64 (with other changes) and Linux/x86_64.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5986
GitOrigin-RevId: b16e079861dcbcc66773295c47d715e443b67eea
2022-09-21 16:48:21 +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
Gil Mizrahi
a598ca47c2
tests-hspec init mssql - use 127.0.0.1 instead of localhost for sqlcmd
...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4590
GitOrigin-RevId: 67e3c6a5d1aa77e2fd180678ec5a619f7b78e65a
2022-05-30 21:05:05 +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