mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
refine test case makedhcp_remote_network and add stop label
This commit is contained in:
parent
0103800a4d
commit
2d380bdf81
@ -194,6 +194,7 @@ end
|
||||
start:makedhcp_remote_network
|
||||
descriptiion:This case is to test when there is mgtifname='!remote!<nicname>', makedhcp could work correctly and create entrys in dhcp lease file.
|
||||
os:linux
|
||||
stop:yes
|
||||
label:mn_only,dhcp
|
||||
cmd:mkdef -t network -o testnetwork net=100.100.100.0 mask=255.255.255.0 mgtifname='!remote!eth0' gateway=100.100.100.1
|
||||
check:rc==0
|
||||
@ -213,7 +214,7 @@ cmd:if [ -f /var/lib/dhcpd/dhcpd.leases ]; then a="/var/lib/dhcpd/dhcpd.leases";
|
||||
cmd:makedhcp testnode
|
||||
check:rc==0
|
||||
cmd:if [ -f /var/lib/dhcpd/dhcpd.leases ]; then a="/var/lib/dhcpd/dhcpd.leases"; elif [ -f /var/lib/dhcp/db/dhcpd.leases ]; then a="/var/lib/dhcp/db/dhcpd.leases"; elif [ -f "/var/lib/dhcp/dhcpd.leases" ]; then a="/var/lib/dhcp/dhcpd.leases";fi; ls -l $a; cat $a
|
||||
cmd:a=2;while true; do [ $a -eq 64 ] && exit 1;output=$(makedhcp -q testnode);[ $? -ne 0 ] && exit 1;echo $output|grep testnode 2>/dev/null && exit 0;a=$[$a*2];sleep $a;done
|
||||
cmd:a=2;while true; do [ $a -eq 64 ] && exit 1;output=$(makedhcp -q testnode);[ $? -ne 0 ] && exit 1;echo $output|grep testnode 2>/dev/null && exit 0;a=$[$a*2]; makedhcp testnode; sleep $a;done
|
||||
check:rc==0
|
||||
check:output=~testnode: ip-address = 100.100.100.2
|
||||
cmd:makedhcp -d testnode
|
||||
|
Loading…
x
Reference in New Issue
Block a user