lotus/cli/util
Nikola Divic 811bc62d65 test: cli test setup & test chain head
CLI actions lack unit tests. I decided to use the approach similar to
what I found in `send_test.go` using gomock, but I don't rely on custom
"service" implementations but mock the whole FullNode API.
This first commit validates the test setup by testing the simplest method
of the chain category, e.g. `chain head`.

This requires a minor refactor of the CLI action code:
- The constructor (`GetFullNodeAPI`) checks if there's an injected mock
API in the app Metadata and uses that in unit tests.
- Actions shouldn't use raw `fmt.*` but instead write to the `app.Writer`
so the CLI output is testable
2022-02-08 17:15:45 +01:00
..
api.go test: cli test setup & test chain head 2022-02-08 17:15:45 +01:00
apiinfo.go api client: Use versioned api packages 2021-03-23 19:15:53 +01:00
verbose.go rename flag to very verbose. 2021-07-27 20:49:30 +01:00