qiujiayu commented on a change in pull request #1167: feature: auto import 
nameservers into APISIX from system resolv file.…
URL: https://github.com/apache/incubator-apisix/pull/1167#discussion_r389429267
 
 

 ##########
 File path: .travis/apisix_cli_test.sh
 ##########
 @@ -52,3 +52,17 @@ if [ ! $? -eq 0 ]; then
 fi
 
 echo "passed: change default ssl port"
+
+# check nameserver imported
+i=`grep  -E 
'^nameserver[[:space:]]+(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4]0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])[[:space:]]?$'
 /etc/resolv.conf | awk '{print $2}'`
+for ip in $i
+do
+  echo $ip
+  grep $ip conf/nginx.conf > /dev/null
+  if [ ! $? -eq 0 ]; then
+    echo "failed: system DNS "$ip "unimported"
+    exit 1
+  fi
+done
+
 
 Review comment:
   This use case is used to test whether local DNS has been imported into 
nginx.conf

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to