Yiyiyimu commented on a change in pull request #2101:
URL: https://github.com/apache/apisix/pull/2101#discussion_r561629722



##########
File path: .travis/apisix_cli_test/test_main.sh
##########
@@ -500,6 +500,43 @@ fi
 sed -i 's/worker_processes: 2/worker_processes: auto/'  conf/config.yaml
 echo "passed: worker_processes number is configurable"
 
+# check customized config.yaml is copied and reverted.
+
+git checkout conf/config.yaml
+
+echo "
+apisix:
+    admin_api_mtls:
+        admin_ssl_cert: '../t/certs/apisix_admin_ssl.crt'
+        admin_ssl_cert_key: '../t/certs/apisix_admin_ssl.key'
+    port_admin: 9180
+    https_admin: true
+" > conf/customized_config.yaml
+
+make init
+
+./bin/apisix start -c conf/customized_config.yaml
+
+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
+    echo "failed: customized config.yaml copied failed"
+    exit 1
+fi
+# to revert the customized config and start a new one
+make stop
+
+./bin/apisix start
+
+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')

Review comment:
       Maybe I could compare if after `make stop`, is `config.yaml` still the 
same with the original one




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


Reply via email to