diff --git a/TODO.md b/TODO.md index 4937271852e7d869faad2b9aa548a92439b03f55..cb6d7f86056f17c9889e2249f5fed238428d9b64 100644 --- a/TODO.md +++ b/TODO.md @@ -26,8 +26,8 @@ was ich so sehe ... ✅ Loadmeter ✅ MysqlConnect -> mysqli->real_connect() Fatal error: Uncaught mysqli_sql_exception: No such file or directory ✅ PdoConnect - ⬜ Phpmodules - ⬜ Ping + ✅ Phpmodules -> funcktioniert formal, aber bei Nicht-PHP-Apps nicht relevant; getestet werden die im Binary eincomoilierten Module + ✅ Ping ⬜ PortTcp ⬜ Simple ⬜ SqliteConnect diff --git a/tests/200_phpmodules.php b/tests/200_phpmodules.php new file mode 100644 index 0000000000000000000000000000000000000000..967f259f16aa74d01b58ededc6dfef5348a492c3 --- /dev/null +++ b/tests/200_phpmodules.php @@ -0,0 +1,7 @@ +#!/usr/bin/env php +<?php + +echo " +WHAT: Run check phpmodules +"; +_exec("$AMCLI --ini='".__DIR__."/configs/phpmodules.ini'"); diff --git a/tests/200_ping.php b/tests/200_ping.php new file mode 100644 index 0000000000000000000000000000000000000000..3cca6e27c49de485b06be9b0d5446f23af655c68 --- /dev/null +++ b/tests/200_ping.php @@ -0,0 +1,7 @@ +#!/usr/bin/env php +<?php + +echo " +WHAT: Run check ping +"; +_exec("$AMCLI --ini='".__DIR__."/configs/ping.ini'"); diff --git a/tests/configs/phpmodules.ini b/tests/configs/phpmodules.ini new file mode 100644 index 0000000000000000000000000000000000000000..9355b4400a4eed6b9ae9c0fc5c9aab9b6cb2ca08 --- /dev/null +++ b/tests/configs/phpmodules.ini @@ -0,0 +1,23 @@ +; ======================================================================= +; +; APPMONITOR CLI CLIENT +; +; for the checks see its parameters +; <https://os-docs.iml.unibe.ch/appmonitor/PHP_client/Plugins/Checks/index.html> +; +; ======================================================================= + + +; ----------------------------------------------------------------------- +; CHECKS +; ----------------------------------------------------------------------- + +["PHP modules"] +description="Modules test" +function="Phpmodules" +params='{ + "required": ["pdo", "json"], + "optional": ["curl"] +}' + +; ----------------------------------------------------------------------- diff --git a/tests/configs/ping.ini b/tests/configs/ping.ini new file mode 100644 index 0000000000000000000000000000000000000000..c1b848d6fe5abebe3ba34173c348f68fb0fec179 --- /dev/null +++ b/tests/configs/ping.ini @@ -0,0 +1,22 @@ +; ======================================================================= +; +; APPMONITOR CLI CLIENT +; +; for the checks see its parameters +; <https://os-docs.iml.unibe.ch/appmonitor/PHP_client/Plugins/Checks/index.html> +; +; ======================================================================= + + +; ----------------------------------------------------------------------- +; CHECKS +; ----------------------------------------------------------------------- + +["Ping"] +description="Ping www.example.com" +function="Ping" +params='{ + "host": "www.example.com" +}' + +; -----------------------------------------------------------------------