Apisix-dashboard: test: clean the temporary data in etcd at the end of test case

Created on 2 Dec 2020  路  9Comments  路  Source: apache/apisix-dashboard

the current way: https://github.com/apache/apisix-dashboard/blob/96e3ad1ec87f35d52d75f0a560dc152843e21e23/api/test/e2e/route_test.go#L227-L260

The current way is to completely depend on the developer and bring extra work to the test case maintainer.

we need a common way to clean all of the temporary data in etcd after running the test cases of each file.

backend testcase wait for update

Most helpful comment

any news? @starsz

Sorry for I am late. I think we can do this work when we use ginko framework.
As far as I know, we will use ginko framework in M2.4, so this will be solved at that time.

All 9 comments

I think this feature is useful. The E2E test cases are unstable, I think this feature will improve the stability of E2E testing.

@nic-chen @ShiningRush do you think we can implement this feature at milestone 2.2?

It is useful and easy to implement with go's TestMain, We can ensure etcd is fresh before start test.

@gxthrj @nic-chen do you know TestMain? Any suggestions?

I think we need to clear ETCD data without distinction before or after running test, by TestMain.

The TestMain way is a test suite like ginkgo, we can use it make struct more clear, but I still like ginkgo mode.

cc @starsz

any news? @starsz

any news? @starsz

Sorry for I am late. I think we can do this work when we use ginko framework.
As far as I know, we will use ginko framework in M2.4, so this will be solved at that time.

Was this page helpful?
0 / 5 - 0 ratings