2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-01 17:17:36 +00:00

add test for issue 922 (#5179)

This commit is contained in:
Weihua Hu
2018-05-09 14:07:21 +08:00
committed by yangsong
parent 175b7f1289
commit 21a138502a
7 changed files with 80 additions and 0 deletions

View File

@@ -71,6 +71,16 @@ check:output=~64 bytes from $$CN
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
cmd:xdsh $$CN "cat /test.synclist"
check:rc==0
#add test for issue922
cmd:xdsh $$CN "ls -l /bin/ping"
cmd:xdsh $$CN "ping -c 1 127.0.0.1"
check:rc==0
cmd:xdsh $$CN "useradd -m xcatuser"
check:rc==0
cmd:xdsh $$CN "su - xcatuser sh -c \"ping -c 1 127.0.0.1\""
check:rc==0
cmd:xdsh $$CN "userdel xcatuser"
check:rc==0
cmd:if [[ -f /test.synclist.bak ]] ;then mv -f /test.synclist.bak /tmp/test.synclist;else rm -rf /test.synclist;fi
cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists=
end

View File

@@ -68,6 +68,16 @@ check:rc==0
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
cmd:xdsh $$CN "cat /test.synclist"
check:rc==0
#add test for issue922
cmd:xdsh $$CN "ls -l /bin/ping"
cmd:xdsh $$CN "ping -c 1 127.0.0.1"
check:rc==0
cmd:xdsh $$CN "useradd -m xcatuser"
check:rc==0
cmd:xdsh $$CN "su - xcatuser sh -c \"ping -c 1 127.0.0.1\""
check:rc==0
cmd:xdsh $$CN "userdel xcatuser"
check:rc==0
cmd:if [[ -f /test.synclist.bak ]] ;then mv -f /test.synclist.bak /test.synclist;else rm -rf /test.synclist;fi
cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists=
end

View File

@@ -72,6 +72,16 @@ check:rc==0
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
cmd:xdsh $$CN "cat /test.synclist"
check:rc==0
#add test for issue922
cmd:xdsh $$CN "ls -l /bin/ping"
cmd:xdsh $$CN "ping -c 1 127.0.0.1"
check:rc==0
cmd:xdsh $$CN "useradd -m xcatuser"
check:rc==0
cmd:xdsh $$CN "su - xcatuser sh -c \"ping -c 1 127.0.0.1\""
check:rc==0
cmd:xdsh $$CN "userdel xcatuser"
check:rc==0
cmd:if [[ -f /test.synclist.bak ]] ;then mv -f /test.synclist.bak /test.synclist;else rm -rf /test.synclist;fi
cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists=
check:rc==0

View File

@@ -73,6 +73,16 @@ cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,ar
check:rc==0
cmd:xdsh $$CN "cat /test.synclist"
check:rc==0
#add test for issue922
cmd:xdsh $$CN "ls -l /bin/ping"
cmd:xdsh $$CN "ping -c 1 127.0.0.1"
check:rc==0
cmd:xdsh $$CN "useradd -m xcatuser"
check:rc==0
cmd:xdsh $$CN "su - xcatuser sh -c \"ping -c 1 127.0.0.1\""
check:rc==0
cmd:xdsh $$CN "userdel xcatuser"
check:rc==0
cmd:if [[ -f /test.synclist.bak ]] ;then mv -f /test.synclist.bak /test.synclist;else rm -rf /test.synclist;fi
cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists=
check:rc==0

View File

@@ -81,6 +81,16 @@ check:output=~$$CN: $$CN
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
cmd:xdsh $$CN "echo "test"> /test.statelite"
check:rc!=0
#add test for issue922
cmd:xdsh $$CN "ls -l /bin/ping"
cmd:xdsh $$CN "ping -c 1 127.0.0.1"
check:rc==0
cmd:xdsh $$CN "useradd -m xcatuser"
check:rc==0
cmd:xdsh $$CN "su - xcatuser sh -c \"ping -c 1 127.0.0.1\""
check:rc==0
cmd:xdsh $$CN "userdel xcatuser"
check:rc==0
cmd:output=$(xdsh $$CN ls -al / |grep test.statelite);if [[ $? -eq 0 ]];then xdsh $$CN rm -rf /test.tatelite;fi
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then rm -rf $rootimgdir;fi
check:rc==0
@@ -121,6 +131,16 @@ cmd:ping $$CN -c 3
check:rc==0
check:output=~64 bytes from $$CN
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
#add test for issue922
cmd:xdsh $$CN "ls -l /bin/ping"
cmd:xdsh $$CN "ping -c 1 127.0.0.1"
check:rc==0
cmd:xdsh $$CN "useradd -m xcatuser"
check:rc==0
cmd:xdsh $$CN "su - xcatuser sh -c \"ping -c 1 127.0.0.1\""
check:rc==0
cmd:xdsh $$CN "userdel xcatuser"
check:rc==0
cmd:rm -rf /tmp/image;mkdir /tmp/image
check:rc==0
cmd:imgexport __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute /tmp/image/image.tgz

View File

@@ -101,6 +101,16 @@ check:output=~$$CN: $$CN
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
cmd:xdsh $$CN "echo "test"> /test.statelite"
check:rc!=0
#add test for issue922
cmd:xdsh $$CN "ls -l /bin/ping"
cmd:xdsh $$CN "ping -c 1 127.0.0.1"
check:rc==0
cmd:xdsh $$CN "useradd -m xcatuser"
check:rc==0
cmd:xdsh $$CN "su - xcatuser sh -c \"ping -c 1 127.0.0.1\""
check:rc==0
cmd:xdsh $$CN "userdel xcatuser"
check:rc==0
cmd:output=$(xdsh $$CN ls -al / |grep test.statelite);if [[ $? -eq 0 ]];then xdsh $$CN rm -rf /test.tatelite;fi
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then rm -rf $rootimgdir;fi
check:rc==0

View File

@@ -93,6 +93,16 @@ cmd:xdsh $$CN hostname
check:rc==0
check:output=~$$CN: $$CN
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
#add test for issue922
cmd:xdsh $$CN "ls -l /bin/ping"
cmd:xdsh $$CN "ping -c 1 127.0.0.1"
check:rc==0
cmd:xdsh $$CN "useradd -m xcatuser"
check:rc==0
cmd:xdsh $$CN "su - xcatuser sh -c \"ping -c 1 127.0.0.1\""
check:rc==0
cmd:xdsh $$CN "userdel xcatuser"
check:rc==0
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi
check:rc==0
end