summaryrefslogtreecommitdiffhomepage
path: root/test/unit/check/chroot.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/check/chroot.py')
-rw-r--r--test/unit/check/chroot.py40
1 files changed, 19 insertions, 21 deletions
diff --git a/test/unit/check/chroot.py b/test/unit/check/chroot.py
index 1b7aae90..ac5a91d0 100644
--- a/test/unit/check/chroot.py
+++ b/test/unit/check/chroot.py
@@ -7,26 +7,24 @@ http = TestHTTP()
def check_chroot():
- available = option.available
-
- resp = http.put(
- url='/config',
- sock_type='unix',
- addr=f'{option.temp_dir}/control.unit.sock',
- body=json.dumps(
- {
- "listeners": {"*:7080": {"pass": "routes"}},
- "routes": [
- {
- "action": {
- "share": option.temp_dir,
- "chroot": option.temp_dir,
+ return (
+ 'success'
+ in http.put(
+ url='/config',
+ sock_type='unix',
+ addr=f'{option.temp_dir}/control.unit.sock',
+ body=json.dumps(
+ {
+ "listeners": {"*:7080": {"pass": "routes"}},
+ "routes": [
+ {
+ "action": {
+ "share": option.temp_dir,
+ "chroot": option.temp_dir,
+ }
}
- }
- ],
- }
- ),
+ ],
+ }
+ ),
+ )['body']
)
-
- if 'success' in resp['body']:
- available['features']['chroot'] = True