summaryrefslogtreecommitdiffhomepage
path: root/test/unit/check
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/check')
-rw-r--r--test/unit/check/chroot.py32
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