diff --git a/suite2cases/netdata b/suite2cases/netdata new file mode 100644 index 0000000000000000000000000000000000000000..422f4ee92fb41386b379bcfb1d09d60026f4426f --- /dev/null +++ b/suite2cases/netdata @@ -0,0 +1 @@ +oe_test_netdata_start diff --git a/testcases/package-test/netdata/oe_test_netdata_start/oe_test_netdata_start.sh b/testcases/package-test/netdata/oe_test_netdata_start/oe_test_netdata_start.sh new file mode 100644 index 0000000000000000000000000000000000000000..fce7b1018fc31d09a4880b750f9f2b552205b2ef --- /dev/null +++ b/testcases/package-test/netdata/oe_test_netdata_start/oe_test_netdata_start.sh @@ -0,0 +1,38 @@ +#!/usr/bin/bash + +# Copyright (c) 2022. Huawei Technologies Co.,Ltd.ALL rights reserved. +# This program is licensed under Mulan PSL v2. +# You can use it according to the terms and conditions of the Mulan PSL v2. +# http://license.coscl.org.cn/MulanPSL2 +# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +# See the Mulan PSL v2 for more details. + +################################### +#@Author : qinhaiqi +#@Contact : 2683064908@qq.com +#@Date : 2022/1/26 +#@License : Mulan PSL v2 +#@Desc : Test "netdata" command +################################### + +source "$OET_PATH/libs/locallibs/common_lib.sh" + +function run_test() { + LOG_INFO "Start to run test." + netdata + CHECK_RESULT $? + lsof -i :19999|grep -v "COMMAND" | awk '{print $1}' + CHECK_RESULT $? + LOG_INFO "End to run test." +} + +function post_test() { + LOG_INFO "Start to restore the test environment." + PID=`lsof -i :19999|grep -v "PID" | awk '{print $2}'` + kill $PID + LOG_INFO "End to restore the test environment." +} + +main "$@"