We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TestAPIAll和TestAPIScanKV中均准备了三条数据,在测试分页查询时只断言了返回的position,并末断言trans和kv数量。增加assert.Equal(t, 2, len(m["transactions"].([]interface{})))断言后,单独跑TestAPIAll没问题,但api_test.go单测一起跑该断言会被其他用例产生的数据污染。
看代码只在main_test.go中第一次启动时清理持久层数据。不知道go的单测是否为顺序执行的,若是则可以在这两个单测前执行清理数据,若不是则这类非精确查找单测的数据隔离性有待改进。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
TestAPIAll和TestAPIScanKV中均准备了三条数据,在测试分页查询时只断言了返回的position,并末断言trans和kv数量。增加assert.Equal(t, 2, len(m["transactions"].([]interface{})))断言后,单独跑TestAPIAll没问题,但api_test.go单测一起跑该断言会被其他用例产生的数据污染。
看代码只在main_test.go中第一次启动时清理持久层数据。不知道go的单测是否为顺序执行的,若是则可以在这两个单测前执行清理数据,若不是则这类非精确查找单测的数据隔离性有待改进。
The text was updated successfully, but these errors were encountered: