mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 09:51:59 +03:00
e93ddc1b53
### Description Our python test suite has several major problems; one of them being that the tests themselves are not responsible for their own setup. We are therefore using environment variables for all matters of configuration, such as _where the postgres instance is_. This is something that should be changed, but in the meantime, it is the test implementer's responsibility to ensure that tests have a consistent setup in CI and locally, or to to add the proper "skip" annotations. The recently added `test_pg_add_source_with_source_parameters` fails to do so: as it tests adding a postgres source from hardcoded parameters, rather than relying on environment variables, it only works if the postgres instance is at the matching address, which happens to be the one set in the circle ci config. This is undesirable for two reasons: - it breaks local tests: running tests locally with `dev.sh` sets postgres up differently, and the test fails; - a change to the circle config would result in failures in that test. Sadly, there's no good solution here: our tests do not currently support expanding environment variables in the queries' yaml files, meaning it's not possible to set the values of all those parameters differently in each environment. And we haven't yet started working towards having a unified testing environment setup. As a result, this PR disables the offending test UNLESS the postgres instance happens to be exactly where the test expects it. This is also very inelegant and adds more tech debt to the pile, but I do not see how to fix this with our current test infrastructure. :( https://github.com/hasura/graphql-engine-mono/pull/2336 GitOrigin-RevId: 8bc9142075d14acaa48e9c4b20de2527185bc75c |
||
---|---|---|
.. | ||
bench-wrk | ||
benchmarks | ||
packaging | ||
src-exec | ||
src-lib | ||
src-rsr | ||
src-test | ||
tests-py | ||
.dockerignore | ||
.gitignore | ||
.hlint.yaml | ||
.stylish-haskell.yaml | ||
cabal.project.ci | ||
commit_diff.txt | ||
CONTRIBUTING.md | ||
graphql-engine.cabal | ||
Makefile | ||
Setup.hs | ||
STYLE.md |