summaryrefslogtreecommitdiffhomepage
path: root/test/unit/status.py (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-07-12tests: Fix `/status' endpoint tests for new 'modules' sectionAndrei Zeliankou1-5/+8
Now that the `/status` endpoint returns a list of loaded language modules, e.g { "modules": { "python": { "version": "3.12.2", "lib": "/opt/unit/modules/python.unit.so" }, ... ... } This broke 'test/test_status.py' in a number of ways 1) The check for all the object values being 0 at startup is no longer true with the modules section. 2) The find_diffs() check broke trying to subtract strings from strings. So don't include the 'modules' section in the check_zeros() check and in the find_diffs() check, if we're dealing with strings do a basic compare returning that value instead. [ Commit message - Andrew ] Co-developed-by: Andrew Clayton <a.clayton@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-01-15Tests: pathlib used where appropriateAndrei Zeliankou1-5/+5
Also fixed various pylint errors and style issues.
2023-06-14Tests: get rid of classes in test files.Andrei Zeliankou1-2/+2
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.
2022-09-05Tests: added tests for basic statistics.Andrei Zeliankou1-0/+45