mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 17:46:38 +00:00
Merge pull request #4319 from neo954/dns-forward-mode
Add test case - switch_to_dns_forward_mode
This commit is contained in:
commit
8805526bb8
@ -0,0 +1,64 @@
|
||||
start:switch_to_dns_forward_mode
|
||||
description:The test case is used to switch the whole testing cluster to run in dns forward mode. This test case should run after service node deployment.
|
||||
os:Linux
|
||||
|
||||
##
|
||||
# Check if everything is fine
|
||||
##
|
||||
cmd:getent hosts $$MN
|
||||
check:rc==0
|
||||
cmd:getent hosts $$SN
|
||||
check:rc==0
|
||||
cmd:getent hosts $$CN
|
||||
check:rc==0
|
||||
|
||||
# Turn off the DNS forward
|
||||
cmd:chdef -t site forwarders=
|
||||
check:rc==0
|
||||
cmd:chdef -t site nameservers='<xcatmaster>'
|
||||
check:rc==0
|
||||
cmd:makedns -n
|
||||
check:rc==0
|
||||
|
||||
# Restart the named service
|
||||
cmd:service named restart
|
||||
cmd:sleep 1
|
||||
|
||||
# Check if an outside host name resolving does not work
|
||||
cmd:xdsh $$CN "getent hosts www.ibm.com"
|
||||
check:rc!=0
|
||||
|
||||
##
|
||||
# Change to use the DNS server in c910
|
||||
##
|
||||
cmd:chdef -t site forwarders=10.0.0.103,10.0.0.101
|
||||
check:rc==0
|
||||
cmd:chdef -t site nameservers='<xcatmaster>'
|
||||
check:rc==0
|
||||
cmd:makedns -n
|
||||
check:rc==0
|
||||
|
||||
# Restart the named service on $$MN and $$SN
|
||||
cmd:service named restart
|
||||
cmd:sleep 1
|
||||
cmd:xdsh service 'service named restart'
|
||||
cmd:sleep 1
|
||||
|
||||
##
|
||||
# Check if everything is still fine
|
||||
##
|
||||
cmd:getent hosts $$MN
|
||||
check:rc==0
|
||||
cmd:getent hosts $$SN
|
||||
check:rc==0
|
||||
cmd:getent hosts $$CN
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "getent hosts $$MN"
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "getent hosts $$SN"
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "getent hosts $$CN"
|
||||
check:rc==0
|
||||
# Check if an outside host name resolving works
|
||||
cmd:xdsh $$CN "getent hosts www.ibm.com"
|
||||
check:rc==0
|
Loading…
x
Reference in New Issue
Block a user