Recently, Vinci and I are refactoring the `manager api` for Apache APISIX dashboard, to remove the dependency on MySQL, and that will write data to ETCD directly.
We have completed the main work. Yesterday I tried to use the test cases in the `t/admin` dir of Apache APISIX to test the refactored `manager api`. Many use cases failed because they tested the response status code and response body. The status code can be maintained the same, but the response body is difficult, especially the error message, because a lot of this information comes from third-party libraries, such as `jsonschme`. I think it’s time to discuss how to develop and test between `manager api` and APISIX The main issue is how to test to ensure that the data is correct between APISIX and `manager api`. Especially in the development process, when the data schema needs to be changed. There are currently two ideas. 1. Share test cases This method guarantees the correctness of the data to the greatest extent, but it is more complicated (we need to make a lot of modifications to the old use cases, and the two projects need to pull each other's code for cooperation testing) and the two projects are relatively coupled. 2. Agreed on a schema and test separately This method is relatively simple, and the two projects can also be decoupled. But it is not so restrictive.
