Vote for option 2.
The future goal is to gradually weaken AdminAPI, so it would be better for
ManagerAPI not to be affected by history

YuanSheng Wang <[email protected]> 于2020年10月16日周五 下午7:17写道:

> For APISIX test cases, most of them are E2E tests. We will discard the Lua
> version of the Admin API later.
>
> So I think that after switching to the Golang version of the Admin API, I
> have to update the old test cases of APISIX.
>
> @JunXu Chen
>
> How long would it take if all test cases under "t/admin" were
> re-implemented with the Golang way?
>
> On Fri, Oct 16, 2020 at 5:57 PM Zexuan Luo <[email protected]> wrote:
>
> > I vote for the second one. We can hide the details in the test helpers.
> >
> > JunXu Chen <[email protected]> 于2020年10月16日周五 上午9:08写道:
> >
> > > Hi, community,
> > >
> > > what do you think ?
> > >
> > > On Fri, Oct 16, 2020 at 9:05 AM JunXu Chen <[email protected]>
> wrote:
> > >
> > > > 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.
> > > >
> > >
> >
>
>
> --
>
> *MembPhis*
> My GitHub: https://github.com/membphis
> Apache APISIX: https://github.com/apache/apisix
>

Reply via email to