bisakhmondal commented on pull request #1705:
URL: https://github.com/apache/apisix-dashboard/pull/1705#issuecomment-814925817


   > hi @bisakhmondal
   > Have you tested it locally?
   
   Hii @nic-chen , yes many times inside an isolated docker container (ubuntu 
image) just like CI. There is literally no issue. Everything is working fine.
   **Snippet used**:
   ```shell
   # test manager-api output for bad data on etcd
   # make a dummy entry
   etcdctl put /apisix/routes/unique1 "{\"id\":}"
   sleep 2
   ## for debugging purpose ------------
   #./etcd-v3.4.14-linux-amd64/etcdctl get --keys-only --prefix /apisix/routes
   #./etcd-v3.4.14-linux-amd64/etcdctl get /apisix/routes/unique1
   ##-------------------------------
   
   ./manager-api 2>man-api.err &
   sleep 4
   
   if [[ `cat man-api.err | grep -c "Error occurred while initializing logical 
store:  /apisix/routes"` -ne '1' ||
   `cat man-api.err | grep -c "json unmarshal failed"` -ne '1' ]];then
     echo "manager api failed to stream error on stderr for bad data"
     exit 1
   fi
   echo "Test Successful"
   # delete dummy entry
   etcdctl del /apisix/routes/unique1
   # just to make sure
   ./manager-api stop
   ```
   
   **Output**:
   You can see there is no previous entry for `/apisix/routes/unique1` and no 
file name `man-api.err` as well (just to make sure) where the stderr stream is 
getting flushed.
   
![image](https://user-images.githubusercontent.com/41498427/113875764-b75b3180-97d4-11eb-8f01-5fcbb638e7bd.png)
   


-- 
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:
[email protected]


Reply via email to