mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-22 03:32:04 +00:00
Merge pull request #1213 from tingtli/xcatd
write xcatd test cases for service xcatd output changes for systemd managed on sles12* and ubuntu16.04, update bundle files according
This commit is contained in:
commit
16b4989fe5
@ -196,5 +196,11 @@ switchdiscover_range_r
|
||||
switchdiscover_range_x
|
||||
switchdiscover_range_z
|
||||
switchdiscover_range_z_V
|
||||
xcatd_start_systemd
|
||||
xcatd_stop_systemd
|
||||
xcatd_restart_systemd
|
||||
run_command_with_XCATBYPASS_systemd
|
||||
disable_root_permission_in_policy_table_systemd
|
||||
assign_certain_command_permission_systemd
|
||||
sles_migration1
|
||||
sles_migration2
|
||||
|
@ -201,12 +201,12 @@ switchdiscover_range_x
|
||||
switchdiscover_range_z
|
||||
switchdiscover_range_z_V
|
||||
nodeset_check_warninginfo
|
||||
xcatd_start
|
||||
xcatd_stop
|
||||
xcatd_restart
|
||||
run_command_with_XCATBYPASS
|
||||
disable_root_permission_in_policy_table
|
||||
assign_certain_command_permission
|
||||
xcatd_start_systemd
|
||||
xcatd_stop_systemd
|
||||
xcatd_restart_systemd
|
||||
run_command_with_XCATBYPASS_systemd
|
||||
disable_root_permission_in_policy_table_systemd
|
||||
assign_certain_command_permission_systemd
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_statelite_installation_flat
|
||||
sles_migration1
|
||||
|
@ -252,6 +252,12 @@ switchdiscover_range_r
|
||||
switchdiscover_range_x
|
||||
switchdiscover_range_z
|
||||
switchdiscover_range_z_V
|
||||
xcatd_start_systemd
|
||||
xcatd_stop_systemd
|
||||
xcatd_restart_systemd
|
||||
run_command_with_XCATBYPASS_systemd
|
||||
disable_root_permission_in_policy_table_systemd
|
||||
assign_certain_command_permission_systemd
|
||||
makentp_v
|
||||
makentp_h
|
||||
makentp_V
|
||||
|
@ -201,11 +201,11 @@ switchdiscover_range_x
|
||||
switchdiscover_range_z
|
||||
switchdiscover_range_z_V
|
||||
nodeset_check_warninginfo
|
||||
xcatd_start
|
||||
xcatd_stop
|
||||
xcatd_restart
|
||||
run_command_with_XCATBYPASS
|
||||
disable_root_permission_in_policy_table
|
||||
assign_certain_command_permission
|
||||
xcatd_start_systemd
|
||||
xcatd_stop_systemd
|
||||
xcatd_restart_systemd
|
||||
run_command_with_XCATBYPASS_systemd
|
||||
disable_root_permission_in_policy_table_systemd
|
||||
assign_certain_command_permission_systemd
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_statelite_installation_flat
|
||||
|
@ -234,9 +234,9 @@ switchdiscover_range_r
|
||||
switchdiscover_range_x
|
||||
switchdiscover_range_z
|
||||
switchdiscover_range_z_V
|
||||
xcatd_start
|
||||
xcatd_stop
|
||||
xcatd_restart
|
||||
run_command_with_XCATBYPASS
|
||||
disable_root_permission_in_policy_table
|
||||
assign_certain_command_permission
|
||||
xcatd_start_systemd
|
||||
xcatd_stop_systemd
|
||||
xcatd_restart_systemd
|
||||
run_command_with_XCATBYPASS_systemd
|
||||
disable_root_permission_in_policy_table_systemd
|
||||
assign_certain_command_permission_systemd
|
||||
|
@ -243,6 +243,12 @@ switchdiscover_range_r
|
||||
switchdiscover_range_x
|
||||
switchdiscover_range_z
|
||||
switchdiscover_range_z_V
|
||||
xcatd_start_systemd
|
||||
xcatd_stop_systemd
|
||||
xcatd_restart_systemd
|
||||
run_command_with_XCATBYPASS_systemd
|
||||
disable_root_permission_in_policy_table_systemd
|
||||
assign_certain_command_permission_systemd
|
||||
nodeset_check_warninginfo
|
||||
rpower_stop
|
||||
rpower_start
|
||||
@ -256,4 +262,4 @@ rmdocker_h
|
||||
rmdocker_command
|
||||
rmdocker_f_command
|
||||
lsdocker_h_command
|
||||
lsdocker_l_command
|
||||
lsdocker_l_command
|
||||
|
@ -28,6 +28,47 @@ cmd:result=`ps -ef | grep "xcatd: Command log writer" | grep -v grep | wc -l`; i
|
||||
check:output=~only one process
|
||||
end
|
||||
|
||||
start:xcatd_start_systemd
|
||||
description:this is the test case when xcat service is managed by systemd on sles12* and ubuntu16.04, the output of service xcatd changes,stop then start xcatd daemon, and check all the 6 processes are running
|
||||
os:linux
|
||||
cmd:service xcatd status
|
||||
check:rc==0
|
||||
check:output=~xcatd.service
|
||||
check:output=~active \(running\)
|
||||
check:output=~/system.slice/xcatd.service
|
||||
check:output=~xcatd: SSL listener
|
||||
check:output=~xcatd: DB Access
|
||||
check:output=~xcatd: UDP listener
|
||||
check:output=~xcatd: install monitor
|
||||
check:output=~xcatd: Discovery worker
|
||||
check:output=~xcatd: Command log writer
|
||||
cmd:service xcatd stop
|
||||
check:rc==0
|
||||
cmd:sleep 3
|
||||
cmd:service xcatd status
|
||||
check:rc!=0
|
||||
check:output=~xcatd.service
|
||||
check:output=~inactive \(dead\)
|
||||
cmd:service xcatd start
|
||||
check:rc==0
|
||||
cmd:service xcatd status
|
||||
check:rc==0
|
||||
check:output=~xcatd.service
|
||||
check:output=~active \(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
|
||||
end
|
||||
|
||||
|
||||
start:xcatd_stop
|
||||
description:stop xcatd daemon, then check all the 6 processes are stopped
|
||||
@ -53,6 +94,38 @@ cmd:service xcatd start
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:xcatd_stop_systemd
|
||||
description:this is the test case when xcat service is managed by systemd on sles12* and ubuntu16.04, the output of service xcatd changes,stop xcatd daemon, then check all the 6 processes are stopped
|
||||
os:linux
|
||||
cmd:service xcatd status
|
||||
check:rc==0
|
||||
check:output=~xcatd.service
|
||||
check:output=~active \(running\)
|
||||
check:output=~/system.slice/xcatd.service
|
||||
check:output=~xcatd: SSL listener
|
||||
check:output=~xcatd: DB Access
|
||||
check:output=~xcatd: UDP listener
|
||||
check:output=~xcatd: install monitor
|
||||
check:output=~xcatd: Discovery worker
|
||||
check:output=~xcatd: Command log writer
|
||||
cmd:service xcatd stop
|
||||
check:rc==0
|
||||
cmd:sleep 3
|
||||
cmd:service xcatd status
|
||||
check:rc!=0
|
||||
check:output=~xcatd.service
|
||||
check:output=~inactive \(dead\)
|
||||
cmd:ps -ef | grep xcatd
|
||||
check:output!~"xcatd: SSL listener"
|
||||
check:output!~"xcatd: DB Access"
|
||||
check:output!~"xcatd: UDP listener"
|
||||
check:output!~"xcatd: install monitor"
|
||||
check:output!~"xcatd: Discovery worke"
|
||||
check:output!~"xcatd: Command log writer"
|
||||
cmd:service xcatd start
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:xcatd_restart
|
||||
description:restart xcatd daemon
|
||||
os:linux
|
||||
@ -66,6 +139,22 @@ check:output=~xcatd service is running
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:xcatd_restart_systemd
|
||||
description:this is the test case when xcat service is managed by systemd on sles12* and ubuntu16.04, the output of service xcatd changes,restart xcatd daemon
|
||||
os:linux
|
||||
cmd:service xcatd status
|
||||
check:rc==0
|
||||
check:output=~xcatd.service
|
||||
check:output=~active \(running\)
|
||||
cmd:times=10; while [ $times -gt 0 ]; do service xcatd restart; if [ "$?" -ne "0" ]; then break; fi; ((times--)); done; if [ $times -gt 0 ]; then $?=1; fi
|
||||
check:rc==0
|
||||
cmd:service xcatd status
|
||||
check:rc==0
|
||||
check:output=~xcatd.service
|
||||
check:output=~active \(running\)
|
||||
end
|
||||
|
||||
|
||||
start:run_command_with_XCATBYPASS
|
||||
description:with XCATBYPASS=YES, the command works either xcatd deamon running or not
|
||||
os:linux
|
||||
@ -94,6 +183,41 @@ check:rc==0
|
||||
check:output=~xcatd service is running
|
||||
end
|
||||
|
||||
start:run_command_with_XCATBYPASS_systemd
|
||||
description:wis is the test case when xcat service is managed by systemd,on sles12* and ubuntu16.04, the output of service xcatd changes,with XCATBYPASS=YES, the command works either xcatd deamon running or not
|
||||
os:linux
|
||||
cmd:service xcatd status
|
||||
check:rc==0
|
||||
check:output=~xcatd.service
|
||||
check:output=~active \(running\)
|
||||
cmd:XCATBYPASS=YES tabdump site
|
||||
check:rc==0
|
||||
cmd:service xcatd stop
|
||||
check:rc==0
|
||||
cmd:sleep 3
|
||||
cmd:service xcatd status
|
||||
eck:rc!=0
|
||||
check:output=~xcatd.service
|
||||
check:output=~inactive \(dead\)
|
||||
cmd:tabdump site
|
||||
check:rc!=0
|
||||
cmd:XCATBYPASS=YES tabdump site
|
||||
check:rc==0
|
||||
cmd:service xcatd start
|
||||
check:rc==0
|
||||
cmd:service xcatd status
|
||||
check:rc==0
|
||||
check:output=~xcatd.service
|
||||
check:output=~active \(running\)
|
||||
check:output=~/system.slice/xcatd.service
|
||||
check:output=~xcatd: SSL listener
|
||||
check:output=~xcatd: DB Access
|
||||
check:output=~xcatd: UDP listener
|
||||
check:output=~xcatd: install monitor
|
||||
check:output=~xcatd: Discovery worker
|
||||
check:output=~xcatd: Command log writer
|
||||
end
|
||||
|
||||
start:disable_root_permission_in_policy_table
|
||||
description:disable root permission, only with XCATBYPASS=YES, the command works
|
||||
os:linux
|
||||
@ -112,6 +236,25 @@ cmd:lsdef
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:disable_root_permission_in_policy_table_systemd
|
||||
description:this is the test case when xcat service is managed by systemd on sles12* and ubuntu16.04, the output of service xcatd changes,disable root permission, only with XCATBYPASS=YES, the command works
|
||||
os:linux
|
||||
cmd:service xcatd status
|
||||
check:rc==0
|
||||
check:output=~xcatd.service
|
||||
check:output=~active \(running\)
|
||||
cmd:chtab name=root policy.rule=disable
|
||||
check:rc==0
|
||||
cmd:lsdef
|
||||
check:output=~Error: Permission denied for request
|
||||
cmd:XCATBYPASS=YES lsdef
|
||||
check:rc==0
|
||||
cmd:XCATBYPASS=YES chtab name=root policy.rule=allow
|
||||
check:rc==0
|
||||
cmd:lsdef
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:assign_certain_command_permission
|
||||
description:assign root permission to certain command, only this command works
|
||||
os:linux
|
||||
@ -131,3 +274,25 @@ check:output=~Error: Permission denied for request
|
||||
cmd:chtab name=root policy.commands= policy.rule=allow
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:assign_certain_command_permission_systemd
|
||||
description:this is the test case when xcat service is managed by systemd on sles12* and ubuntu16.04, the output of service xcatd changes,assign root permission to certain command, only this command works
|
||||
os:linux
|
||||
cmd:service xcatd status
|
||||
check:rc==0
|
||||
check:output=~xcatd.service
|
||||
check:output=~active \(running\)
|
||||
cmd:lsdef
|
||||
check:rc==0
|
||||
cmd:tabdump policy
|
||||
check:rc==0
|
||||
cmd:chtab name=root policy.commands=lsdef policy.rule=allow
|
||||
check:rc==0
|
||||
cmd:lsdef
|
||||
check:rc==0
|
||||
cmd:tabdump policy
|
||||
check:output=~Error: Permission denied for request
|
||||
cmd:chtab name=root policy.commands= policy.rule=allow
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user