summaryrefslogtreecommitdiffhomepage
path: root/test/unit/applications/lang/node.py (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-11-08Tests: 8XXX used as default port range.Andrei Zeliankou1-1/+1
After the launch of the project, the testing infrastructure was shared with nginx project in some cases. To avoid port overlap, a decision was made to shift the port range for Unit tests. This problem was resolved a long time ago and is no longer relevant, so it is now safe to use port 8XXX range as the default, as it is more appropriate for testing purposes.
2023-06-14Tests: get rid of classes in test files.Andrei Zeliankou1-4/+5
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-02-21Tests: switched to using f-strings.Andrei Zeliankou1-7/+7
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.
2021-05-24Node.js: renamed "require_shim" to "loader".Oisin Canty1-3/+3
2021-05-12Node.js: a shim for overriding "http" and "websocket" modules.Oisin Canty1-3/+18
Also added stubs for Server.address() This was done to prevent crashes in some popular frameworks like express Supports both CommonJS and the new ES Modules system syntax e.g: app.js: const http = require('http') app.mjs: import http from "http" Usage on Node 14.16.x and higher: { "type": "external", "processes": {"spare": 0}, "working_directory": '/project', "executable": "/usr/bin/env", "arguments": [ "node", "--loader", "unit-http/require_shim.mjs" "--require", "unit-http/require_shim", "app.js" ] } Usage on Node 14.15.x and lower: { "type": "external", "processes": {"spare": 0}, "working_directory": '/project', "executable": "/usr/bin/env", "arguments": [ "node", "--require", "unit-http/require_shim", "app.js" ] }
2020-12-08Tests: utils module introduced.Andrei Zeliankou1-1/+1
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-27Tests: fixed isolation detection.Andrei Zeliankou1-1/+4
2020-10-19Tests: fixed unit.log print.Andrei Zeliankou1-4/+4
2020-10-07Tests: minor fixes.Andrei Zeliankou1-2/+2
2020-10-01Tests: minor fixes.Andrei Zeliankou1-12/+1
Fixed temporary dir removing. Fixed printing path to log. Module checks moved to the separate file.
2020-09-16Tests: migrated to the pytest.Andrei Zeliankou1-6/+7
2020-05-15Tests: style.Andrei Zeliankou1-0/+1
2020-05-14Configuration: URI encoding in the "pass" option.Valentin Bartenev1-1/+4
This is useful to escape "/" in path fragments. For example, in order to reference the application named "foo/bar": { "pass": "applications/foo%2Fbar" }
2019-11-11Tests: added support for testing "user" and "group".Tiago Natel1-2/+3
2019-11-09Tests: fixed tests to run as root.Tiago Natel1-2/+4
- The mode of testdir was changed to allow reading from other users/groups. - The java multipart test now uploads the file into an app writable dir. - The build directory was made readable for other users. - The python environment test now uses the HOME env var instead of PWD because the latter is not set by the root shell (/bin/sh) by default. - The node `node_modules` directory now is copied into the `testdir` instead of using symlinks.
2019-09-14Tests: refactored prerequisites model.Andrey Zelenkov1-0/+11
2019-09-16Tests: style and minor fixes in java.py.Andrey Zelenkov1-1/+0
2019-04-26Tests: check application configuration loading.Andrey Zelenkov1-1/+1
2019-04-22Tests: using "pass" option instead of deprecated "application".Valentin Bartenev1-1/+1
2019-03-28Tests: unit module refactoring.Andrey Zelenkov1-0/+34