graphql-engine/.circleci
Samir Talwar 26e03a07bb server/tests-py: Parallelize JWT tests.
This rewrites the JWT tests to generate and specify the secrets per test class, and to provide the server configuration to the HGE fixture.

It covers the tests in:

  - *test_jwt.py*
  - *test_jwt_claims_map.py*
  - *test_config_api.py*
  - *test_graphql_queries.py* (just a couple here)

This does reduce the number of code paths exercised with JWT, as we were previously running *all* tests with JWT tokens. However, this seems excessive; we don't need to tread every code path, just enough to ensure we handle the tokens appropriately. I believe that the test coverage in *test_jwt.py* does this well enough (though I'd prefer if we moved the coverage lower down in the stack as unit tests).

These tests were configured in multiple different ways by *test-server.sh*; this configuration is now moved to test subclasses within the various files. This results in a bit of duplication.

Unfortunately, the tests would ideally use parameterization rather than subclassing, but that doesn't work because of `hge_fixture_env`, which creates a "soft" dependency between the environment variables and `hge_server`. Parameterizing the former *should* force the latter to be recreated for each new set of environment variables, but `hge_server` isn't actually aware there's a dependency.

It currently looks like this adds lines of code; we'll more than make up for it when we delete the relevant lines from *test-server.sh*. I am not doing that here because I plan on deleting the whole file in a subsequent changeset.

[NDAT-538]: https://hasurahq.atlassian.net/browse/NDAT-538?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8803
GitOrigin-RevId: f7f2caa62de0b0a45e42964b69a8ae73d1575fe8
2023-04-19 10:30:21 +00:00
..
pgbouncer run graphql tests on both http and websocket; add parallelism (close #1868) (#1921) 2019-04-08 12:52:38 +05:30
postgres-12.0-alpine-postgis3 build: rename file to adhere to windows rules (close #4002) (#4003) 2020-03-03 12:33:21 +05:30
postgres-13.0-alpine-postgis3 server: hasura on PG v13 (#125) 2020-12-01 12:22:42 +00:00
server-upgrade-downgrade [server] re-add native sql output 2023-01-27 14:38:07 +00:00
.gitignore run graphql tests on both http and websocket; add parallelism (close #1868) (#1921) 2019-04-08 12:52:38 +05:30
build-docker-image.sh circleci integration (#74) 2018-07-10 10:01:02 +00:00
ciignore.sh server: split server test suite to run in parallel on circleci (#309) 2021-01-25 08:24:13 +00:00
cli-migrations-builder.dockerfile ci: add tests for cli-migrations image (#4396) 2020-04-15 07:26:00 +05:30
config.yml Install and use ODBC Driver 18 for SQL Server (msodbcsql18). 2022-10-21 16:25:04 +00:00
install-cli-builder-deps.sh Install and use ODBC Driver 18 for SQL Server (msodbcsql18). 2022-10-21 16:25:04 +00:00
README.md circleci: Use backport of Matt Pickering's memory reclamation RTS patch in CI 2021-03-12 02:09:21 +00:00
server-test-names.txt server/tests-py: Parallelize JWT tests. 2023-04-19 10:30:21 +00:00
test-console.sh tests: add Postgres 14 and Postgres 15 pytests 2022-10-06 09:46:38 +00:00
test-deprecated-server-flags.sh tests: run server test shell files through shfmt for consistent indentation 2022-01-11 11:22:42 +00:00
test-server-flags.sh server: Add warning log for no admin secret 2022-07-27 11:47:32 +00:00
test-server.sh server: move apollo-federation to GA 2023-03-15 08:15:51 +00:00

TODO(swann): write this out better

Any tests in test-server.sh should also have their names added to server-test-names.txt, otherwise the CI pipelines will not run them.