meltano icon indicating copy to clipboard operation
meltano copied to clipboard

Migrate integration tests to use Pytest

Open visch opened this issue 3 years ago • 2 comments

From #6438

We had an error, action here https://github.com/meltano/meltano/runs/7367356450?check_suite_focus=true

It was easy to tell what was wrong in the meltano.yml , but not so easy to replicate this fix locally

To do so you have to run these steps

  1. You have to run poetry run bash integration/validate.sh meltano-run from the root of meltano
  2. container must be running podman run -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=warehouse -p 5432:5432 -h postgres -d postgres
  3. meltano.yml file in docs/example-library/meltano-run changes as a part of the run, so after you run the first time you must manually go remove all the changes that happen locally. rm -rf docs/example-library/meltano-run/meltano etc etc (5 ish files)
  4. You must run poetry run bash integration/validate.sh meltano-run from the root meltano folder, running anywhere else will break due to to relative integration/validate.sh path

Some of these problems are already handled nicely in pytest , just wanted to share my experience

visch avatar Jul 18 '22 13:07 visch

This has been marked as stale because it is unassigned, and has not had recent activity. It will be closed after 21 days if no further activity occurs. If this should never go stale, please add the evergreen label, or request that it be added.

stale[bot] avatar Apr 26 '23 20:04 stale[bot]

I'm a proponent of using Pytest for many more kinds of tests than just unit tests, and I'd be happy to see our integration tests have their environments set up by Pytest fixtures. As an added benefit, Pytest could delete the files generated by running the integration tests.

WillDaSilva avatar May 08 '23 19:05 WillDaSilva