-
Yaroslav Dynnikov authored
Having two different fixtures `binary_path` and `path_to_binary_with_webui` results in weird failures in CI: ``` FAILED test/int/test_couple.py::test_exit_after_apply - conftest.TarantoolError: ('ER_NO_SUCH_PROC', "Procedure 'pico._inject_error' is not defined") ``` The root cause is that one `cargo build` overrides another with different features enabled. To resolve the issue this patch significantly refactors the test flow: 1. Web UI tests are skipped by default. One can enable it explicitly with `pytest --with-webui` 2. New fixture `cargo_build` behavior depends on environment: - In local dev environment it rebuilds the project with required features - In CI it skips rebuilding and runs tests against the existing build 3. The `path_to_binary_with_webui` fixture is removed. See also: - https://stackoverflow.com/a/55769818/1182787 - https://docs.pytest.org/en/7.4.x/how-to/writing_hook_functions.html - https://docs.pytest.org/en/7.4.x/how-to/mark.html - https://docs.pytest.org/en/7.4.x/example/simple.html#control-skipping-of-tests-according-to-command-line-option
Yaroslav Dynnikov authoredHaving two different fixtures `binary_path` and `path_to_binary_with_webui` results in weird failures in CI: ``` FAILED test/int/test_couple.py::test_exit_after_apply - conftest.TarantoolError: ('ER_NO_SUCH_PROC', "Procedure 'pico._inject_error' is not defined") ``` The root cause is that one `cargo build` overrides another with different features enabled. To resolve the issue this patch significantly refactors the test flow: 1. Web UI tests are skipped by default. One can enable it explicitly with `pytest --with-webui` 2. New fixture `cargo_build` behavior depends on environment: - In local dev environment it rebuilds the project with required features - In CI it skips rebuilding and runs tests against the existing build 3. The `path_to_binary_with_webui` fixture is removed. See also: - https://stackoverflow.com/a/55769818/1182787 - https://docs.pytest.org/en/7.4.x/how-to/writing_hook_functions.html - https://docs.pytest.org/en/7.4.x/how-to/mark.html - https://docs.pytest.org/en/7.4.x/example/simple.html#control-skipping-of-tests-according-to-command-line-option
pytest.ini 84 B
[pytest]
testpaths =
test/int
addopts =
-v --showlocals
markers =
webui