Commit Graph

7 Commits

Author SHA1 Message Date
Philip Lykke Carlsen
ed97e858f7 Actually thread through where those 60 seconds come from
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10864
GitOrigin-RevId: be54d96199eb34d27dbd60b814b297f658c8be8a
2024-06-17 13:56:12 +00:00
Samir Talwar
0ea8bd8df8 server/tests-py: Parallelize test_logging.py.
This adds the ability to capture logs to the HGE fixture, and uses this in test_logging.py to analyze the logs, instead of relying on a shell script redirecting the logs to a file.

We then inject the logs into the tests and parse the JSON. Because we're no longer reading a file, we need to do this in a separate thread, as we'll block on reading rather than the stream ending. (Once HGE stops, the stream will be closed.)

Some of the tests require a JWK server, so this has been extracted from test_jwk.py.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8772
GitOrigin-RevId: 9413e714f1c42b8a0991d0d30c4358209fd30c0c
2023-04-17 13:09:34 +00:00
Samir Talwar
6a81bdd0b9 server/tests-py: Generate random ports for a few more helper services.
I missed these.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6481
GitOrigin-RevId: 8bc92c27c8de25bc3518be5b788e7b5c55867df8
2022-10-27 11:49:06 +00:00
Samir Talwar
0d4d7e6b1e server/tests-py: Start helper services in the test harness.
This makes it possible for the test harness to start the test JWK server and the test remote schema server.

In order to do this, we still generate the TLS certificates in the test script (because we need to install the generated CA certificate in the OS certificate store), and then pass the certificate and key paths into the test runner.

Because we are still using _test-server.sh_ for now, we don't use the JWK server fixture in that case, as HGE needs the JWK server to be up and running when it starts. Instead, we keep running it outside (for now).

This is also the case for the GraphQL server fixture when we are running the server upgrade/downgrade tests.

I have also refactored _graphql_server.py_ so there isn't a global `HGE_URLS` value, but instead the value is passed through.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6303
GitOrigin-RevId: 06f05ff674372dc5d632e55d68e661f5c7a17c10
2022-10-13 15:45:24 +00:00
Daniel Chambers
ba5b7fedd4 Try to make JWK refresh integration tests more reliable in CI
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3577
GitOrigin-RevId: a5f8f6e3dc373e8f2b44fcfdcb6b97696d8c62b5
2022-02-07 09:13:09 +00:00
Daniel Chambers
4d9417fac4 server: Refresh JWKs maximum once per second
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3429
GitOrigin-RevId: 123fe33f026a36282ee1137eeefd612191ff4844
2022-01-28 00:18:56 +00:00
Anon Ray
afd6f30e72 read cache control header to refresh JWK (fix #3301) (#3446) 2019-12-03 14:56:59 -06:00