Skip to content
New issue

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

Support unit test outside #281

Closed
wenhaocs opened this issue Aug 22, 2023 · 0 comments · Fixed by #282
Closed

Support unit test outside #281

wenhaocs opened this issue Aug 22, 2023 · 0 comments · Fixed by #282
Labels
type/feature req Type: feature request

Comments

@wenhaocs
Copy link

Clients may want to write unit tests with nebula-go client. They will mock the Execute interface and return a mock ResultSet. But there is no public function to generate a mock result set. The members inside result set is also private.

We should (1) either create a mock ResultSet and mock Record. (Users are using mockery, //go:generate mockery --name=Client --outpkg=mocknebula --output=./mocknebula)
(2) or expose a public method to construct ResultSet and Record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature req Type: feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant