monkeyDluffy6017 commented on code in PR #9846:
URL: https://github.com/apache/apisix/pull/9846#discussion_r1266544652


##########
t/cli/test_cmd.sh:
##########
@@ -101,37 +101,71 @@ deployment:
             admin_ssl_cert_key: '../t/certs/apisix_admin_ssl.key'
 " > conf/customized_config.yaml
 
-cp conf/config.yaml conf/config_original.yaml
-
 make init
 
 if ./bin/apisix start -c conf/not_existed_config.yaml; then
     echo "failed: apisix still start with invalid customized config.yaml"
     exit 1
 fi
 
+
 ./bin/apisix start -c conf/customized_config.yaml
 
-if cmp -s "conf/config.yaml" "conf/config_original.yaml"; then
-    rm conf/config_original.yaml
-    echo "failed: customized config.yaml copied failed"
+if [ ! -e conf/.config_path ]; then
+    rm conf/customized_config.yaml
+    echo ".config_path file should exits"
     exit 1
 fi
 
 code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} 
https://127.0.0.1:9180/apisix/admin/routes -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1')
 if [ ! $code -eq 200 ]; then
-    rm conf/config_original.yaml conf/customized_config.yaml
+    rm conf/customized_config.yaml
     echo "failed: customized config.yaml not be used"
     exit 1
 fi
 
 make stop
 
-if ! cmp -s "conf/config.yaml" "conf/config_original.yaml"; then
-    rm conf/config_original.yaml conf/customized_config.yaml
-    echo "failed: customized config.yaml reverted failed"
+if [ -e conf/.config_path ]; then
+    rm conf/customized_config.yaml
+    echo ".config_path file should be removed"
+    exit 1
+fi
+
+
+echo "
+deployment:
+    admin:
+        admin_listen:
+            port: 9180
+        https_admin: true
+        admin_api_mtls:
+            admin_ssl_cert: '../t/certs/apisix_admin_ssl.crt'
+            admin_ssl_cert_key: '../t/certs/apisix_admin_ssl.key'
+    etcd:
+        host:
+         - "http://127.0.0.1:22379";
+" > conf/customized_config.yaml
+
+
+if ./bin/apisix start -c conf/customized_config.yaml ; then
+    rm conf/customized_config.yaml
+    echo "start should be failed"
+    exit 1
+fi
+
+
+./bin/apisix start
+
+code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} 
http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1')

Review Comment:
   This test case is the same with the one above?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to