Commit Graph

7 Commits

Author SHA1 Message Date
Samir Talwar
5df8419a4f server/tests-py: Use markers for backends instead of parameterized tests.
I'm trying to shore up the Python integration tests to make them more reliable. In doing so, I noticed this.

---

It feels a lot more sensible as we never run on more than one backend at a time.

This also removes the `check_file_exists` parameter from the setup functions; it never worked. It was always set to the result of a comparison between a backend name and a function, which was always `False`. Enabling it breaks things.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5254
GitOrigin-RevId: 8718ab21527c2ba0a7205d1c01ebaac1a10be844
2022-08-02 19:33:59 +00:00
Rakesh Emmadi
793aede022 server/mssql: improve database exception handling and better API errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3487
GitOrigin-RevId: d3f696072e8290b45c2f81509ce31cb5c13a4aef
2022-02-07 14:12:55 +00:00
Rakesh Emmadi
f45130bc39 server/mssql: move mssql_run_sql test cases from v1/run_sql to v2/mssql/run_sql
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3370
GitOrigin-RevId: dfeb6e2dfda3fbe6ec2d318909dc793042b86d04
2022-01-18 02:21:04 +00:00
Rakesh Emmadi
08f1725698 server/mssql: expand transactions to GraphQL queries and mssql_run_sql API
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3286
GitOrigin-RevId: 0b37767e271dfa43d36fa7f7cc9928ba6a22964d
2022-01-14 14:09:22 +00:00
Rakesh Emmadi
f49bb2b180 server/mssql: rollback a transaction based on the transaction state
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3247
GitOrigin-RevId: 70307d8723a63b9314b6ff4d897dcac6e8e93fb9
2022-01-05 08:03:59 +00:00
Rakesh Emmadi
8e88e73a52 server/mssql: add cascade to mssql_run_sql
<!-- Thank you for ss in the Title above ^ -->

## Description
<!-- Please fill thier. -->
<!-- Describe the changes from a user's perspective -->
We don't have dependency reporting mechanism for `mssql_run_sql` API i.e when a database object (table, column etc.) is dropped through the API we should raise an exception if any dependencies (relationships, permissions etc.) with the database object exists in the metadata.

This PR addresses the above mentioned problem by
-> Integrating transaction to the API to rollback the SQL query execution if dependencies exists and exception is thrown
-> Accepting `cascade` optional field in the API payload to drop the dependencies, if any
-> Accepting `check_metadata_consistency` optional field to bypass (if value set to `false`) the dependency check

### Related Issues
<!-- Please make surt title -->
<!-- Add the issue number below (e.g. #234) -->
Close #1853

### Solution and Design
<!-- How is this iss -->
<!-- It's better if we elaborate -->
The design/solution follows the `run_sql` API implementation for Postgres backend.

### Steps to test and verify
<!-- If this is a fehis is a bug-fix, how do we verify the fix? -->
- Create author - article tables and track them
- Defined object and array relationships
- Try to drop the article table without cascade or cascade set to `false`
- The server should raise the relationship dependency exists exception

## Changelog

-  `CHANGELOG.md` is updated with user-facing content relevant to this PR.
  If no changelog is required, then add the `no-changelog-required` label.

## Affected components
<!-- Remove non-affected components from the list -->

-  Server
-  Console
-  CLI
-  Docs
-  Community Content
-  Build System
-  Tests
-  Other (list it)

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2636
GitOrigin-RevId: 0ab152295394056c4ca6f02923142a1658ad25dc
2021-10-22 14:50:13 +00:00
Solomon Bothwell
d88e2bbcce server: add tests ensuring the correct functioning of all endpoints based on user roles
https://github.com/hasura/graphql-engine-mono/pull/1625

Co-authored-by: Sameer Kolhar <6604943+kolharsam@users.noreply.github.com>
GitOrigin-RevId: 6b56efc838d2ed1acc44b2847161fde22d6aee17
2021-07-16 16:09:25 +00:00