monkeyDluffy6017 commented on code in PR #9846:
URL: https://github.com/apache/apisix/pull/9846#discussion_r1266545922
##########
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
+
+
Review Comment:
ditto
--
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]