2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-18 20:30:56 +00:00

Add test case for issue 3542 : to ensure that CSM required info is not removed from /opt/xcat/xcatinfo

This commit is contained in:
litingt
2019-01-28 03:39:28 -05:00
parent cfb07a05e4
commit 9e4ab19830
7 changed files with 55 additions and 0 deletions

View File

@ -107,6 +107,11 @@ check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$SN mount
check:rc==0
check:output=~on / type tmpfs
cmd:xdsh $$SN cat /opt/xcat/xcatinfo
check:rc==0
check:output=~NODE=$$SN
check:output=~IMAGENAME='__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service'
check:output=~IMAGEUUID='\w+-\w+-\w+-\w+-\w+'
cmd:xdsh $$SN rpm -qa|grep "xCAT-openbmc-py"
check:rc==0
check:output=~xCAT-openbmc-py-\d

View File

@ -91,6 +91,10 @@ check:output=~/install on /install
cmd:xdsh $$SN "mount"
check:rc==0
check:output=~/tftpboot on /tftpboot
cmd:xdsh $$SN cat /opt/xcat/xcatinfo
check:rc==0
check:output=~NODE=$$SN
check:output=~IMAGENAME=__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service
cmd:xdsh $$SN "cat /var/log/xcat/xcat.log"
cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "x86_64" ]]; then if [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then xdsh $$SN "zypper -n install perl-Sys-Virt"; elif [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]];then xdsh $$SN "yum install -y perl-Sys-Virt";fi;fi
check:rc==0

View File

@ -58,6 +58,10 @@ check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$CN mount
check:rc==0
cmd:xdsh $$CN cat /opt/xcat/xcatinfo
check:rc==0
check:output=~NODE=$$CN
check:output=~IMAGENAME=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
cmd:sleep 120
#comment for further discussion
#cmd:if ! ([[ "__GETNODEATTR($$CN,os)__" = "sles12.1" ]] || [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" && "__GETNODEATTR($$CN,arch)__" = "x86_64" ]]) ;then xdsh $$CN service ntpd status;fi

View File

@ -66,6 +66,11 @@ check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$CN mount
check:rc==0
cmd:xdsh $$CN cat /opt/xcat/xcatinfo
check:rc==0
check:output=~NODE=$$CN
check:output=~IMAGENAME=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:output=~SERVICEGROUP=$$SN
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
cmd:xdsh $$CN "cat /test.synclist"
check:rc==0

View File

@ -63,6 +63,11 @@ check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$CN mount
check:rc==0
check:output=~on / type tmpfs
cmd:xdsh $$CN cat /opt/xcat/xcatinfo
check:rc==0
check:output=~NODE=$$CN
check:output=~IMAGENAME='__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute'
check:output=~IMAGEUUID='\w+-\w+-\w+-\w+-\w+'
cmd:sleep 120
cmd:ping $$CN -c 3
check:rc==0

View File

@ -69,6 +69,12 @@ check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$CN mount
check:rc==0
check:output=~on / type tmpfs
cmd:xdsh $$CN cat /opt/xcat/xcatinfo
check:rc==0
check:output=~NODE=$$CN
check:output=~IMAGENAME='__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute'
check:output=~IMAGEUUID='\w+-\w+-\w+-\w+-\w+'
check:output=~SERVICEGROUP=$$SN
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi
check:rc==0

View File

@ -370,3 +370,29 @@ cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/
cmd:mv -f /rootimg.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg
end
start:packimage_uuid
os:Linux
description:this case is to verfy bug 3542,ensure that CSM required info is not removed from /opt/xcat/xcatinfo.
label:others,packaging
cmd:lsdef -z $$CN >> /tmp/node.stanza
cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi
cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz /rootimg.cpio.gz.bak;fi
cmd:copycds $$ISO
cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:cp /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg/opt/xcat/xcatinfo /tmp/uuid
cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:uuid=`cat /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg/opt/xcat/xcatinfo |grep UUID|awk -F= '{print $2}'`;grep $uuid /tmp/uuid
check:rc!=0
cmd:ls -l /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz
check:rc==0
cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz
cmd:mv -f /rootimg.cpio.gz.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz
cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg
cmd:mv -f /rootimg.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg
cmd:if [ -e /tmp/node.stanza ]; then rmdef $$CN; cat /tmp/node.stanza | mkdef -z; rm -rf /tmp/node.stanza; fi
end