2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-21 02:30:21 +00:00

refine test cases which were designed in flat originally to support hierarchy

This commit is contained in:
litingt
2019-01-17 21:58:52 -05:00
parent 1ecada2c60
commit a628416294
4 changed files with 9 additions and 9 deletions

View File

@@ -79,7 +79,7 @@ description:chtab with error table
label:mn_only,ci_test,db
cmd:chtab error=error site.comment=error
check:rc!=0
check:output=~no such column|column \"error\" does not exist
check:output=~no such column|column \"error\" does not exist|Unknown column \'error\'
end

View File

@@ -1,10 +1,10 @@
start:xdcp_nonroot_user
label:cn_os_ready,parallel_cmds
cmd:useradd -m xyzzy
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN "useradd -m xyzzy";else useradd -m xyzzy;fi
check:rc==0
cmd:bash -c "( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )"
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN "bash -c \"( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )\"";else bash -c "( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )";fi
check:rc==0
cmd:chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN "chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh";else chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh;fi
check:rc==0
cmd:xdsh $$CN "useradd -m xyzzy"
check:rc==0
@@ -12,12 +12,12 @@ cmd:xdsh $$CN "( cd ~ && tar cf - .ssh ) | ( cd ~xyzzy && tar xf - )"
check:rc==0
cmd:xdsh $$CN "chown -R xyzzy ~xyzzy/.ssh"
check:rc==0
cmd:su -c "xdcp $$CN /etc/sysctl.conf /tmp/sysctl.conf" - xyzzy
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN "su -c \"xdcp $$CN /etc/sysctl.conf /tmp/sysctl.conf\" - xyzzy";else su -c "xdcp $$CN /etc/sysctl.conf /tmp/sysctl.conf" - xyzzy;fi
check:rc==0
cmd:xdsh $$CN "stat -c '%U' /tmp/sysctl.conf"
check:output=~xyzzy
cmd:xdsh $$CN "userdel xyzzy"
check:rc==0
cmd:userdel xyzzy
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN "userdel xyzzy";else userdel xyzzy;fi
check:rc==0
end

View File

@@ -13,7 +13,7 @@ end
start:xdsh_regular_command
label:cn_os_ready,parallel_cmds
cmd:XCATBYPASS=1 xdsh $$CN "ps -ef"
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$CN "ps -ef";else XCATBYPASS=1 xdsh $$CN "ps -ef";fi
check:rc==0
check:output=~$$CN:\s+UID\s+PID\s+PPID\s+C\s+STIME\s+TTY\s+TIME\s+CMD
end

View File

@@ -3,10 +3,10 @@ description: Test the exit code when command xdsh failed
label:cn_os_ready,parallel_cmds
cmd:xdsh $$CN date
check:rc==0
cmd:mv /root/.ssh/id_rsa /root/.ssh/id_rsa.backup
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN mv /root/.ssh/id_rsa /root/.ssh/id_rsa.backup;else mv /root/.ssh/id_rsa /root/.ssh/id_rsa.backup;fi
check:rc==0
cmd:xdsh $$CN date
check:rc!=0
cmd:mv /root/.ssh/id_rsa.backup /root/.ssh/id_rsa
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN mv /root/.ssh/id_rsa.backup /root/.ssh/id_rsa;else mv /root/.ssh/id_rsa.backup /root/.ssh/id_rsa;fi
check:rc==0
end