feat: add api test

Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
This commit is contained in:
Xinwei Xiong(cubxxw)
2023-11-07 03:31:16 +08:00
parent 762ff65225
commit 4d2332f1e3
19 changed files with 1254 additions and 326 deletions
+3 -6
View File
@@ -173,8 +173,7 @@ function openim::rpc::info() {
}
# install openim-rpc
function openim::rpc::install()
{
function openim::rpc::install() {
pushd "${OPENIM_ROOT}"
# 1. Build openim-rpc
@@ -208,8 +207,7 @@ function openim::rpc::install()
}
# Unload
function openim::rpc::uninstall()
{
function openim::rpc::uninstall() {
set +o errexit
for service in "${OPENIM_RPC_SERVICE_LISTARIES[@]}"; do
openim::common::sudo "systemctl stop ${service}"
@@ -223,8 +221,7 @@ function openim::rpc::uninstall()
}
# Status Check
function openim::rpc::status()
{
function openim::rpc::status() {
for service in "${OPENIM_RPC_SERVICE_LISTARIES[@]}"; do
# Check the running status of the ${service}. If active (running) is displayed, the ${service} is started successfully.
systemctl status ${service}|grep -q 'active' || {