summaryrefslogtreecommitdiffhomepage
path: root/test/unit/applications/lang/php.py
diff options
context:
space:
mode:
authorDan Callahan <d.callahan@f5.com>2024-02-27 15:15:42 +0000
committerDan Callahan <d.callahan@f5.com>2024-02-27 15:15:42 +0000
commitd76761901c4084bcdbc5a449e9bbb47d56b7093c (patch)
treeb4b7b4e3d588b73a2adcc0094cab466d9194c679 /test/unit/applications/lang/php.py
parentc43629880472bba8d389dfb0b7ae6d883b0ba499 (diff)
parent088117008c9e8f397a58cc8d8070ce047beff12f (diff)
downloadunit-d76761901c4084bcdbc5a449e9bbb47d56b7093c.tar.gz
unit-d76761901c4084bcdbc5a449e9bbb47d56b7093c.tar.bz2
Merge tag '1.32.0' into branches/packaging1.32.0-1
Unit 1.32.0 release.
Diffstat (limited to 'test/unit/applications/lang/php.py')
-rw-r--r--test/unit/applications/lang/php.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/unit/applications/lang/php.py b/test/unit/applications/lang/php.py
index b9b6dbf1..ac59ec1b 100644
--- a/test/unit/applications/lang/php.py
+++ b/test/unit/applications/lang/php.py
@@ -1,4 +1,4 @@
-import os
+from pathlib import Path
import shutil
from unit.applications.proto import ApplicationProto
@@ -15,10 +15,9 @@ class ApplicationPHP(ApplicationProto):
if kwargs.get('isolation') and kwargs['isolation'].get('rootfs'):
rootfs = kwargs['isolation']['rootfs']
- if not os.path.exists(f'{rootfs}/app/php/'):
- os.makedirs(f'{rootfs}/app/php/')
+ Path(f'{rootfs}/app/php/').mkdir(parents=True, exist_ok=True)
- if not os.path.exists(f'{rootfs}/app/php/{script}'):
+ if not Path(f'{rootfs}/app/php/{script}').exists():
shutil.copytree(script_path, f'{rootfs}/app/php/{script}')
script_path = f'/app/php/{script}'
@@ -42,7 +41,7 @@ class ApplicationPHP(ApplicationProto):
self._load_conf(
{
- "listeners": {"*:7080": {"pass": f"applications/{script}"}},
+ "listeners": {"*:8080": {"pass": f"applications/{script}"}},
"applications": {script: app},
},
**kwargs,