diff options
author | Konstantin Pavlov <thresh@nginx.com> | 2023-05-10 10:29:16 -0700 |
---|---|---|
committer | Konstantin Pavlov <thresh@nginx.com> | 2023-05-10 10:29:16 -0700 |
commit | 69235c513277c64b513447d9b92c3c03d616f577 (patch) | |
tree | 0780c92ba28d92b547c85ea0bee5e3040e14dee2 /test/unit/check | |
parent | b9bc222021e77bbdfb12576b3e315b962cf6b399 (diff) | |
parent | faf97dc06058de1c929af33a68adb34d3932b374 (diff) | |
download | unit-1.30.0-1.tar.gz unit-1.30.0-1.tar.bz2 |
Merged with the default branch.1.30.0-1
Diffstat (limited to '')
-rw-r--r-- | test/unit/check/chroot.py | 2 | ||||
-rw-r--r-- | test/unit/check/isolation.py | 30 | ||||
-rw-r--r-- | test/unit/check/node.py | 2 | ||||
-rw-r--r-- | test/unit/check/unix_abstract.py | 2 |
4 files changed, 18 insertions, 18 deletions
diff --git a/test/unit/check/chroot.py b/test/unit/check/chroot.py index 40b75058..1b7aae90 100644 --- a/test/unit/check/chroot.py +++ b/test/unit/check/chroot.py @@ -12,7 +12,7 @@ def check_chroot(): resp = http.put( url='/config', sock_type='unix', - addr=option.temp_dir + '/control.unit.sock', + addr=f'{option.temp_dir}/control.unit.sock', body=json.dumps( { "listeners": {"*:7080": {"pass": "routes"}}, diff --git a/test/unit/check/isolation.py b/test/unit/check/isolation.py index 9bd835a3..4ebce893 100644 --- a/test/unit/check/isolation.py +++ b/test/unit/check/isolation.py @@ -27,8 +27,8 @@ def check_isolation(): "empty": { "type": "external", "processes": {"spare": 0}, - "working_directory": option.test_dir + "/go/empty", - "executable": option.temp_dir + "/go/app", + "working_directory": f"{option.test_dir}/go/empty", + "executable": f"{option.test_dir}/go/app", "isolation": {"namespaces": {"credential": True}}, }, }, @@ -41,8 +41,8 @@ def check_isolation(): "empty": { "type": "python", "processes": {"spare": 0}, - "path": option.test_dir + "/python/empty", - "working_directory": option.test_dir + "/python/empty", + "path": f"{option.test_dir}/python/empty", + "working_directory": f"{option.test_dir}/python/empty", "module": "wsgi", "isolation": {"namespaces": {"credential": True}}, } @@ -56,8 +56,8 @@ def check_isolation(): "phpinfo": { "type": "php", "processes": {"spare": 0}, - "root": option.test_dir + "/php/phpinfo", - "working_directory": option.test_dir + "/php/phpinfo", + "root": f"{option.test_dir}/php/phpinfo", + "working_directory": f"{option.test_dir}/php/phpinfo", "index": "index.php", "isolation": {"namespaces": {"credential": True}}, } @@ -73,8 +73,8 @@ def check_isolation(): "empty": { "type": "ruby", "processes": {"spare": 0}, - "working_directory": option.temp_dir + "/ruby/empty", - "script": option.temp_dir + "/ruby/empty/config.ru", + "working_directory": f"{option.temp_dir}/ruby/empty", + "script": f"{option.temp_dir}/ruby/empty/config.ru", "isolation": {"namespaces": {"credential": True}}, } }, @@ -87,11 +87,11 @@ def check_isolation(): "listeners": {"*:7080": {"pass": "applications/empty"}}, "applications": { "empty": { - "unit_jars": option.current_dir + "/build", + "unit_jars": f"{option.current_dir}/build", "type": "java", "processes": {"spare": 0}, - "working_directory": option.test_dir + "/java/empty/", - "webapp": option.temp_dir + "/java", + "working_directory": f"{option.temp_dir}/java/empty/", + "webapp": f"{option.temp_dir}/java", "isolation": {"namespaces": {"credential": True}}, } }, @@ -106,7 +106,7 @@ def check_isolation(): "basic": { "type": "external", "processes": {"spare": 0}, - "working_directory": option.temp_dir + "/node", + "working_directory": f"{option.temp_dir}/node", "executable": "app.js", "isolation": {"namespaces": {"credential": True}}, } @@ -120,8 +120,8 @@ def check_isolation(): "body_empty": { "type": "perl", "processes": {"spare": 0}, - "working_directory": option.test_dir + "/perl/body_empty", - "script": option.test_dir + "/perl/body_empty/psgi.pl", + "working_directory": f"{option.test_dir}/perl/body_empty", + "script": f"{option.test_dir}/perl/body_empty/psgi.pl", "isolation": {"namespaces": {"credential": True}}, } }, @@ -133,7 +133,7 @@ def check_isolation(): resp = http.put( url='/config', sock_type='unix', - addr=option.temp_dir + '/control.unit.sock', + addr=f'{option.temp_dir}/control.unit.sock', body=json.dumps(conf), ) diff --git a/test/unit/check/node.py b/test/unit/check/node.py index e053a749..dd59e7a4 100644 --- a/test/unit/check/node.py +++ b/test/unit/check/node.py @@ -3,7 +3,7 @@ import subprocess def check_node(current_dir): - if not os.path.exists(current_dir + '/node/node_modules'): + if not os.path.exists(f'{current_dir}/node/node_modules'): return None try: diff --git a/test/unit/check/unix_abstract.py b/test/unit/check/unix_abstract.py index 5d1f629e..aadde43a 100644 --- a/test/unit/check/unix_abstract.py +++ b/test/unit/check/unix_abstract.py @@ -12,7 +12,7 @@ def check_unix_abstract(): resp = http.put( url='/config', sock_type='unix', - addr=option.temp_dir + '/control.unit.sock', + addr=f'{option.temp_dir}/control.unit.sock', body=json.dumps( { "listeners": {"unix:@sock": {"pass": "routes"}}, |