summaryrefslogtreecommitdiffhomepage
path: root/test/test_respawn.py (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-01-15Tests: pathlib used where appropriateAndrei Zeliankou1-0/+1
Also fixed various pylint errors and style issues.
2023-06-14Tests: get rid of classes in test files.Andrei Zeliankou1-63/+70
Class usage came from the unittest framework and it was always redundant after migration to the pytest. This commit removes classes from files containing tests to make them more readable and understandable.
2023-06-12Tests: prerequisites checking reworked.Andrei Zeliankou1-2/+2
Prerequisites check moved to the module level to simplify class structure. Discovery and prerequisites checks functions moved to the separate files. Introduced "require" fixture to provide per-test requirements check.
2023-05-25Tests: unified setup method usage.Andrei Zeliankou1-3/+4
To make fixtures accessible inside of setup methods in tests all these methods are renamed to the "setup_method_fixture" and decorated by autouse flag. Also all setup methods moved to the top of the files.
2023-05-25Tests: removed unused variables.Andrei Zeliankou1-1/+1
2023-02-21Tests: switched to using f-strings.Andrei Zeliankou1-9/+9
Previously, it was necessary to support older versions of Python for compatibility. F-strings were released in Python 3.6. Python 3.5 was marked as unsupported by the end of 2020, so now it's possible to start using f-strings safely for better readability and performance.
2022-04-11Tests: style.Andrei Zeliankou1-2/+1
2021-07-01Tests: fixing racing condition in respawn tests.Max Romanov1-5/+10
A race may occur between the router process restart and the main process sending a notification to the running controller. For example, a test script detects the new process and starts performing a smoke test, but the controller has not yet received the 'remove PID' notification, so the connection to the router is broken and any attempt to update the configuration will cause an error. The solution is to perform several attempts to reconfigure Unit with a short delay between failures.
2021-04-05Tests: style.Andrei Zeliankou1-3/+4
2021-03-31Tests: added file descriptor leak detection.Andrei Zeliankou1-2/+4
2021-01-08Tests: fixed test_respawn.py to act upon test processes.Tiago Natel de Moura1-23/+28
Running `test_respawn_` test cases on a machine with Unit daemon in background would fail tests because `ps ax` was used without filtering out other unit instances. This patch also prevents from tests killing other Unit processes not related to tests.
2020-12-08Tests: skip_alert() converted to the fixture.Andrei Zeliankou1-4/+3
2020-12-06Tests: options moved to the separate class.Andrei Zeliankou1-1/+1
This change is necessary to separate the logic and prevent possible circular dependency.
2020-10-19Tests: fixed unit.log print.Andrei Zeliankou1-3/+2
2020-10-07Tests: minor fixes.Andrei Zeliankou1-1/+1
2020-09-16Tests: migrated to the pytest.Andrei Zeliankou1-25/+20
2020-05-15Tests: style.Andrei Zeliankou1-2/+2
2020-05-12Tests: added respawn tests.Andrei Zeliankou1-0/+95