summaryrefslogtreecommitdiffhomepage
path: root/test/unit/applications/lang/php.py
diff options
context:
space:
mode:
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,