diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2021-05-05 12:36:57 +0100 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2021-05-05 12:36:57 +0100 |
commit | e0a061955bba69aaf28022d405362c8a5e444ff6 (patch) | |
tree | 5767b5d2e385aab3230b971d915aab6a480e2b28 /test/unit | |
parent | de631d8c36cebdd69018dfa3ff145ba8b701a2d1 (diff) | |
download | unit-e0a061955bba69aaf28022d405362c8a5e444ff6.tar.gz unit-e0a061955bba69aaf28022d405362c8a5e444ff6.tar.bz2 |
Tests: added tests for openat2() features.
Diffstat (limited to '')
-rw-r--r-- | test/unit/check/chroot.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/unit/check/chroot.py b/test/unit/check/chroot.py new file mode 100644 index 00000000..40b75058 --- /dev/null +++ b/test/unit/check/chroot.py @@ -0,0 +1,32 @@ +import json + +from unit.http import TestHTTP +from unit.option import option + +http = TestHTTP() + + +def check_chroot(): + available = option.available + + resp = http.put( + url='/config', + sock_type='unix', + addr=option.temp_dir + '/control.unit.sock', + body=json.dumps( + { + "listeners": {"*:7080": {"pass": "routes"}}, + "routes": [ + { + "action": { + "share": option.temp_dir, + "chroot": option.temp_dir, + } + } + ], + } + ), + ) + + if 'success' in resp['body']: + available['features']['chroot'] = True |