graphql-engine/server/tests-py/pytest.ini
Samir Talwar 8cb2738cbe server/tests-py: Declaratively state the HGE environment variables.
This has two purposes:

* When running the Python integration tests against a running HGE instance, with `--hge-url`, it will check the environment variables available and actively skip the test if they aren't set. This replaces the previous ad-hoc skip behavior.
* More interestingly, when running against a binary with `--hge-bin`, the environment variables are passed through, which means different tests can run with different environment variables.

  On top of this, the various services we use for testing now also provide their own environment variables, rather than expecting a test script to do it.

In order to make this work, I also had to invert the dependency between various services and `hge_ctx`. I extracted a `pg_version` fixture to provide the PostgreSQL version, and now pass the `hge_url` and `hge_key` explicitly to `ActionsWebhookServer`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6028
GitOrigin-RevId: 16d866741dba5887da1adf4e1ade8182ccc9d344
2022-09-28 09:21:02 +00:00

12 lines
663 B
INI

[pytest]
norecursedirs = queries webhook test_upgrade
; Turn any expected failures that pass ("xpassed") into hard failures. This
; lets us use 'xfail' to create test cases that validate other tests, and also
; means we're sure to notice if e.g. a known bug is fixed.
xfail_strict = true
markers =
backend: The backends supported by the test case
hge_env: Pass additional environment variables to the GraphQL Engine
skip_server_upgrade_test: Tests with this marker should not be run as part of server upgrade test
allow_server_upgrade_test: Add tests with this marker to server upgrade test, as far as they don't have the skip_server_upgarde_test market