2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-18 04:10:46 +00:00

Merge pull request #5155 from hu-weihua/xcatd_start

update test case 'xcatd_start' for issue 5152
This commit is contained in:
Yuan Bai
2018-05-02 14:59:42 +08:00
committed by GitHub

View File

@ -1,31 +1,46 @@
start:xcatd_start
description:stop then start xcatd daemon, and check all the 6 processes are running
os:linux
cmd:if [ -d "/tmp/xcatd_start" ]; then mv /tmp/xcatd_start /tmp/xcatd_start.org; fi; mkdir -p /tmp/xcatd_start
check:rc==0
cmd:service xcatd status
check:rc==0
check:output=~xcatd service is running
check:output=~Active: active \(running\)|xcatd service is running
cmd:ps axjf |grep -v grep |grep "xcatd:" | tee /tmp/xcatd_start/original_xcatd_processes_status
check:rc==0
cmd:cat /tmp/xcatd_start/original_xcatd_processes_status |wc -l
check:output=~6
cmd:service xcatd stop
check:rc==0
cmd:sleep 3
cmd:ps axjf |grep -v grep |grep "xcatd:" | tee /tmp/xcatd_start/after_stop_xcatd_processes_status
check:rc==0
cmd:cat /tmp/xcatd_start/after_stop_xcatd_processes_status|wc -l
check:output=~0
cmd:service xcatd start
check:rc==0
check:output=~Starting xcatd
check:output=~[ OK ]
cmd:sleep 3
cmd:service xcatd status
check:rc==0
check:output=~xcatd service is running
cmd:result=`ps -ef | grep "xcatd: SSL listener" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
check:output=~only one process
cmd:result=`ps -ef | grep "xcatd: DB Access" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
check:output=~only one process
cmd:result=`ps -ef | grep "xcatd: UDP listener" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
check:output=~only one process
cmd:result=`ps -ef | grep "xcatd: install monitor" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
check:output=~only one process
cmd:result=`ps -ef | grep "xcatd: Discovery worke" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
check:output=~only one process
cmd:result=`ps -ef | grep "xcatd: Command log writer" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
check:output=~only one process
check:output=~Active: active \(running\)|xcatd service is running
cmd:ps axjf |grep -v grep |grep "xcatd:" | tee /tmp/xcatd_start/after_start_xcatd_processes_status
check:rc==0
cmd:cat /tmp/xcatd_start/after_start_xcatd_processes_status|wc -l
check:output=~6
cmd:grep "xcatd: SSL listener" /tmp/xcatd_start/after_start_xcatd_processes_status|wc -l
check:output=~1
cmd:grep "xcatd: DB Access" /tmp/xcatd_start/after_start_xcatd_processes_status|wc -l
check:output=~1
cmd:grep "xcatd: UDP listener" /tmp/xcatd_start/after_start_xcatd_processes_status|wc -l
check:output=~1
cmd:grep "xcatd: Discovery worker" /tmp/xcatd_start/after_start_xcatd_processes_status|wc -l
check:output=~1
cmd:grep "xcatd: install monitor" /tmp/xcatd_start/after_start_xcatd_processes_status|wc -l
check:output=~1
cmd:grep "xcatd: Command log writer" /tmp/xcatd_start/after_start_xcatd_processes_status|wc -l
check:output=~1
cmd: rm -rf /tmp/xcatd_start; if [ -d "/tmp/xcatd_start.org" ]; then mv /tmp/xcatd_start.org /tmp/xcatd_start; fi
check:rc==0
end
start:xcatd_start_systemd