Closed viniarck closed 8 months ago
Here's an example, of how the env prefix can get discovered
The ultimate expected result is that, locally a development should be able to run any of the pytest
command that currently needs to be run inside the container, for instance:
python3 -m pytest --timeout=60 tests/test_e2e_10_mef_eline.py::TestE2EMefEline::test_on_primary_path_fail_should_migrate_to_backup
Although locally, the database instances still need to be composed up but without kytos
container service, so we can also consider introducing a new docker-compose.yml
file.
This is a feature request to allow developers to be able to execute e2e tests, but optionally without
kytos
service containeramlight/kytos:latest
. For most cases it's easy to build a new docker image and parametrize a branch, however, as @Ktmi also pointed out sometime ago, it'd be great to also have the possibility to targetkytosd
running on the host machine, since that way you can even have a faster iteration edit/test development loop when you're assessing if tests are still passing.To allow this, it's not too far away, basically, if we allowed to start with a different entry point when executing
kytosd
without acontainer
then parametrizing the DB parameters, and also trying to infer if it's on a virtual env and avoid assuming that certain files would be on/var/.*
(same way as kytos already does with config files prepending the venv path when it exists). That would also imply that when running e2e you wouln't be running anotherkytosd
instance, since only a singlekytosd
should be running, which is fine, but something to be aware.Another benefit from running it without the container, is that
mininet
sometimes behaves a bit sluggish or slow to start on certain newer recent kernels when running in a container, so for developers in that situation they can runmininet
on their host machine directly which typically don't have any issues. On my laptop with kernel 6+, sometimes I have to increase pytest timeout just so it can get started and run the tests.Let me know what you guys think you'd be onboard with this additional option or if you have any other suggestions.