aeternity / aepp-sdk-go

Golang SDK to interact with the Æternity blockchain
ISC License
18 stars 10 forks source link

package cmd should be testable without a running node #85

Closed randomshinichi closed 4 years ago

randomshinichi commented 5 years ago

probably needs more refactoring Read go-hugo source code

randomshinichi commented 5 years ago

hugo has a framework just to create cobra.Commands. This pattern may help cmd be less like an integration test that requires a full node.

However, making it more of a unittest and less of an integration test paradoxically decreases my confidence in the code because the actual connection with the node does catch some issues, and gives me more test code to maintain.

So I won't spend time/energy actively looking for a testable cobra.Command pattern, but if one does occur, I will refactor. Then the other concern is that without actual real data, there isn't actually much to test.