end-to-end tests are very handy to debug the code, but the bash logic doesn't play well with subshells (like poetry virtualenvs) and in case of errors I was left with orphan processes holding up the TCP ports needed by the core components. Leaving the core processes running forever doesn't help either, because when you change the workflow code the core components need to be rebooted.
This PR:
migrates the logic to pytest using fixtures for start up and tear down of the needed services, using multiprocess to replicate the old logic of running different components in different processes.
adds a pytest marker e2e that can be used to select-deselect tests (pytest -m"not e2e") for example.
in the future, we might compute coverage from e2e and merge it to the global coverage
coverage: 66.113%. remained the same
when pulling 94c9987c4fdbeedadefde3039c5dc173d02c12de on massi/e2e-pytest
into 1643df0469316db775e7d5e53b04c221eb999ac7 on main.
end-to-end tests are very handy to debug the code, but the bash logic doesn't play well with subshells (like poetry virtualenvs) and in case of errors I was left with orphan processes holding up the TCP ports needed by the core components. Leaving the core processes running forever doesn't help either, because when you change the workflow code the core components need to be rebooted.
This PR:
multiprocess
to replicate the old logic of running different components in different processes.e2e
that can be used to select-deselect tests (pytest -m"not e2e"
) for example.