Commit Graph

29 Commits

Author SHA1 Message Date
Philip Lykke Carlsen
b658df1c43 Spike attempt at adding logging to the hspec test-suite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4772
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 5c6c9056952574462d5b309774331a909a7eac6d
2022-08-03 14:19:53 +00:00
Gil Mizrahi
6dc1eab513 server/tests: Porting Context to Fixture - add custom options
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5270
GitOrigin-RevId: a0f2e401f681e5df0f6cbb6c138686537e3605ee
2022-08-02 18:02:43 +00:00
Tom Harding
73d8d35df3 Add the Schema.TableRelationshipsSpec tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5133
GitOrigin-RevId: 29b749ffc1e47f0d64cc6334bedb265b75fa7aa2
2022-07-25 14:52:42 +00:00
Evie Ciobanu
d76aab99e1 server: postgres multiple updates
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4837
GitOrigin-RevId: 505f669298298fd004dfc4e84eaa0d21df055216
2022-07-18 15:16:47 +00:00
Gil Mizrahi
38b1c0d774 server/tests/bigquery: Expose internal error information + handle teardown robustly + retry on jobRateLimitExceeded error
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4810
Co-authored-by: Samir Talwar <47582+SamirTalwar@users.noreply.github.com>
GitOrigin-RevId: e8696491475a668976a0e86322b7a8772ed9f946
2022-06-27 14:33:42 +00:00
Philip Lykke Carlsen
f33fad5fc1 Zendesk-5146 followup tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4768
GitOrigin-RevId: 2d182344d724cf0fc07ec73f8a3c4d786afe9243
2022-06-17 08:45:13 +00:00
Philip Lykke Carlsen
12c3eddef7 Amendments to the hspec testsuite
This PR proposes some changes to the hspec testsuite:

* It amends the framework to make it easier to test from the ghci REPL
* It introduces a new module `Fixture`, distinguished from `Context` by:
   * using a new concept of `SetupAction`s which bundle setup and teardown actions into one abstraction, making test system state setup more concise, modularized and safe (because the fixture know knows about the ordering of setup actions and can do partial rollbacks)
   * somewhat opinionated, elides the `Options` of `Context`, preferring instead that tests that care about stringification of json numbers manage that themselves.

(Note that this PR builds on #4390, so contains some spurious commits which will become irrelevant once that PR is merged)

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4630
GitOrigin-RevId: 619c8d985aed0aa42de31d6f16891d0782f4b4b5
2022-06-08 16:36:50 +00:00
Philip Lykke Carlsen
3e33fd6ff7 Make on_conflict schema available abstract of update permissions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4390
GitOrigin-RevId: 5f3f9da173cad37f9330c5a27fd1edfc2559a4d6
2022-06-07 23:25:48 +00:00
Solomon
b4f89569c8 GDC: Integration Tests and Servant Agent
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4467
GitOrigin-RevId: 5e81d8581197c90ad2de9106e724c63d7592ae72
2022-05-11 06:15:27 +00:00
Sibi Prabakaran
c199215947 Unified setup for NestedRelationshipsSpec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4378
GitOrigin-RevId: 3881591ad0ec109352e09a989377121550632fdd
2022-05-03 07:38:47 +00:00
Sibi Prabakaran
c9a5d51c70 Implements TestGraphQLBasicCommon tests using hspec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4296
GitOrigin-RevId: aa442d7fa33464546fd3821fe989c738cc853c7c
2022-04-22 10:33:34 +00:00
Sibi Prabakaran
e43a5e4794 Rename State to TestEnvironment in hspec test suite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4309
GitOrigin-RevId: 899b1aa3674654f5c4bdf94dcd45009570b34644
2022-04-20 17:16:42 +00:00
Sibi Prabakaran
87c526039e Additional primitives for the hspec test suite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4263
GitOrigin-RevId: 604a81dba61ab70c171a9a5d550b029687a99bed
2022-04-19 15:40:14 +00:00
Sibi Prabakaran
b9ff51bcb1 Add primitives, utilities for hspec test suite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4246
GitOrigin-RevId: 2bd6db4f7189f1e9283f4aaacadce46a6f5bfec5
2022-04-12 15:41:20 +00:00
Rakesh Emmadi
3f36b7c956 server/mssql: fix SQL generation for check constraints with relationships (fix #8225)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4136
GitOrigin-RevId: 5fe54fe2118ac0309f5ed39696214f9b22768edf
2022-04-05 10:10:32 +00:00
Antoine Leblanc
ccea1da1d5 Enable and test remote relationships from remote schemas.
### Description

This is it! This PR enables the Metadata API for remote relationships from remote schemas, adds tests, ~~adds documentation~~, adds an entry to the Changelog. This is the release PR that enables the feature.

### Checklist
- [ ] Tests:
  - [x] RS-to-Postgres (high level)
  - [x] RS-to-RS (high level)
  - [x] From RS specifically (testing for edge cases)
  - [x] Metadata API tests
  - [ ] Unit testing the actual engine?
- [x] Changelog entry
- [ ] Documentation?

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3974
Co-authored-by: Vamshi Surabhi <6562944+0x777@users.noreply.github.com>
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
Co-authored-by: jkachmar <8461423+jkachmar@users.noreply.github.com>
GitOrigin-RevId: c9aebf12e6eebef8d264ea831a327b968d4be9d2
2022-03-17 20:54:57 +00:00
jkachmar
647231b685 Yeet some default-extensions
Manually enables:
* EmptyCase
* ExistentialQuantification
* QuantifiedConstraints
* QuasiQuotes
* TemplateHaskell
* TypeFamilyDependencies

...in the following components:
* 'graphql-engine' library
* 'graphql-engine' 'src-test'
* 'graphql-engine' 'tests/integration'
* 'graphql-engine' tests-hspec'

Additionally, performs some light refactoring and documentation.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3991
GitOrigin-RevId: 514477d3466b01f60eca8935d0fef60dd0756838
2022-03-16 00:40:17 +00:00
Gil Mizrahi
c9e80cbfaf tests-hspec refactor + use the new Harness.Test.Schema setup mechanism for the column presets test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3953
GitOrigin-RevId: 02b5fe53d1133c5600a6ad5e55d006f461e6ad87
2022-03-15 16:09:52 +00:00
Aniket Deshpande
45af1d99f4 Migrate all HSpec tests to unified setup/teardown
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3901
GitOrigin-RevId: 3aa35b6f12c28f997dca1a1f9287a12c814152cb
2022-03-10 11:19:13 +00:00
Aniket Deshpande
853e9b760d Draft: server: HSpec: Unify setup/teardown data and specialize for backends
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3765
GitOrigin-RevId: 22c36c83ff900b3423144353ccdf61980b66bc6b
2022-02-28 22:48:44 +00:00
Gil Mizrahi
431dab97d6 tests-hspec: Extract Exceptions, refactor env vars, use json file as well for BigQuery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3777
GitOrigin-RevId: e46458585e21bb431887a30f179d7a1df0b39609
2022-02-23 19:33:32 +00:00
Gil Mizrahi
2e41489a6b tests-hspec refactor leftovers and another small refactor: typos, setup/teardown catch, better error messages for env-vars
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3748
GitOrigin-RevId: 4e4959e41ff33539d82968bbdf56dc10b362e641
2022-02-23 15:27:13 +00:00
Antoine Leblanc
41087fc12a Improve combined context names in tests
### Description

This PR adds a custom instance for `Show` to `ContextName`, to avoid combined names being rendered as `Combine Postgres Postgres`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3750
GitOrigin-RevId: 00a202e4191607c319bd202ea23623d6cc9f0dff
2022-02-22 13:55:21 +00:00
Gil Mizrahi
ad7ecc8ed5 tests-hspec refactors: Feature -> Context, local state creation, enum name
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3743
GitOrigin-RevId: e2b3dba91b1b9ca66e0e140f9ec8d6d2d2e8a319
2022-02-21 17:06:04 +00:00
Antoine Leblanc
5541ec011e Add remote relationships hspec tests
## Description

This PR adds the possibility for hspec tests to start a remote server with a custom schema, using the _morpheus_ library. In addition, it adds:
- X-to-DB object relationships tests
- X-to-DB array relationships tests
- X-to-RS relationships tests

For now, all those X are only postgres, but the tests are written in a way that will allow for it to easily be any other DB, or even remote schemas. The actual tests were taken mostly from #3069.

To achieve this, this PR heavily refactors the test harness. Most importantly: it generalizes the notion of a `Backend` to a notion of generic `Context`, allowing for contexts that are the unions of two backends, or of a backend and a remote schema.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3567
Co-authored-by: jkachmar <8461423+jkachmar@users.noreply.github.com>
GitOrigin-RevId: 623f700ba482743f94d3eaf659e6cfa22cd0dbc9
2022-02-18 13:36:31 +00:00
Antoine Leblanc
dc4a286c64 Prepare test suite for remote servers tests
## Description

This PR adds all the scaffolding for tests that require remote servers. It is mostly a refactor of `Feature`; where we listed for each test a list of individual backends, we now provide a list of `Context`s, that allows for tests to specify not only how it should be setup, but also what state needs to be carried around throughout the test. This will be useful when launching custom remote servers.

Additionally, this PR:
- cleans the way we generate logs in the engine as part of the tests
- cleans the cabal file
- introduce a few more helpers for sending commands to the engine (such as `postMetadata_`)
- allows for headers in queries sent to the engine (to support permissions tests)
- adds basic code to start / stop a "remote" server

This PR is a pre-requisite of #3567.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3573
Co-authored-by: jkachmar <8461423+jkachmar@users.noreply.github.com>
GitOrigin-RevId: 05f808c6b85729dbb3ea6648c3e10a3c16b641ef
2022-02-14 17:25:28 +00:00
Kirill Zaborsky
773870f443 BigQuery hspec tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3435
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: 78f698becb83bd9732eddbe419361aff2799dd2c
2022-02-09 15:30:13 +00:00
Gil Mizrahi
9d2ac22365 tests-hspec - custom finally and readme toc
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3471
GitOrigin-RevId: 4a1477b7e7f175bf7b4c81405747588980c43d7b
2022-01-26 12:18:22 +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