googleapis / googleapis/cloud-bigtable-cbt-cli

Add mocks for unit tests

Open
#54 0 comments 0 reactions 0 assignees View on GitHub
priority: p3 type: cleanup
Dominant language
Go
Stars
15
Forks
42
PR merge metrics
No merged PRs in 30d

Description

Right now the cbt tool doesn't have robust unit tests for individual CLI functions (`doLookup()`, `doRead()`, etc). These functions should have some tests attached to them:

+ Encapsulate all of the functions inside of a struct that can be mocked.
+ Add a dependency to the [gomock](https://github.com/golang/mock) framework.
+ Add a `go:generate` statement that updates the cbt mock structs.
+ Add tests for each method in the CBT that uses the mock frameworks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.