Commit Graph

32 Commits

Author SHA1 Message Date
Anton Evangelatov
62e352ef88 move APIInfoEnvVars, RepoFlags, APIFlags under RepoType 2022-03-03 16:45:11 +01:00
Anton Evangelatov
acbfc879aa config: extract DealmakingConfig and Sealing config from Lotus for Boost (#8172)
* refactor sealingCfg and dealmakingCfg to be able to abstract Config

* fix error messages
2022-03-03 15:37:23 +01:00
Anton Evangelatov
f1f878a000 unexport repo types; use a global var for every repo type 2022-03-03 15:37:23 +01:00
Anton Evangelatov
e3edab66e3 refactor RepoType 2022-03-03 15:37:23 +01:00
Nikola Divic
ae49729afb test: chain sethead cli command
Also moved the mock definition to a separate file (mocks_test.go)
because it's gonna be used in other test files, and it didn't make sense
for it to stay inside chain_test.go.
2022-02-09 20:46:51 +01:00
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
Anton Evangelatov
adcb8f3b15 improve get api error messages 2021-08-16 14:33:08 +03:00
ZenGround0
73a644f320 Review response 2021-08-12 13:09:43 -04:00
ZenGround0
3bb5d4eb8f Strict major minor version checking on v0 and v1 apis 2021-08-11 16:40:14 -04:00
Anton Evangelatov
fa7e52dbda add explicit error msg if repo dir does not exist 2021-08-01 00:22:55 -04:00
Raúl Kripalani
8433aae1af use fallback api infos last; init service with markets-path. 2021-07-29 16:10:04 +01:00
Raúl Kripalani
b17fcfc4d1 bugfix. 2021-07-29 14:36:04 +01:00
Raúl Kripalani
3144da86f3 add RepoType#String; adjust repo parsing logic. 2021-07-29 13:49:51 +01:00
Raúl Kripalani
90427bc3af fix docs, add flag. 2021-07-29 13:39:03 +01:00
Raúl Kripalani
8fae68a5ae fix tests. 2021-07-29 13:21:55 +01:00
Raúl Kripalani
3b2c3a3f6b polish. 2021-07-29 12:56:08 +01:00
Raúl Kripalani
22c0884f5f target markets API for markets commands. 2021-07-29 12:37:29 +01:00
Raúl Kripalani
4e19d8d562 support MARKETS_API_INFO env var; support markets-repo, markets-api-url flags. 2021-07-29 10:55:37 +01:00
Raúl Kripalani
b04fb75a92 rename flag to very verbose. 2021-07-27 20:49:30 +01:00
Raúl Kripalani
48cddd3644 add a super verbose -vv flag to lotus and lotus-miner. 2021-07-27 14:25:28 +01:00
Łukasz Magiera
49e26cce7d api: Separate the Net interface from Common 2021-07-15 11:41:30 +02:00
Łukasz Magiera
508e2d5c49 gateway: Fix api getter 2021-04-20 18:42:12 +02:00
Łukasz Magiera
cf96ad4fdb fix lint 2021-04-06 14:30:49 +02:00
Łukasz Magiera
e8f28d7b9f Fix tests 2021-04-06 12:24:58 +02:00
Łukasz Magiera
d8bff4d19f Make gateway work with v1 api 2021-04-05 13:47:10 +02:00
Łukasz Magiera
64bf5b382b cliutil: cast full api to the v0 interface 2021-04-02 13:20:31 +02:00
Łukasz Magiera
3cac23b4a7 cli: get raw full api correctly 2021-04-02 13:07:56 +02:00
Łukasz Magiera
ba49c6206e cli: Default to v0 api for now 2021-04-01 14:17:22 +02:00
Łukasz Magiera
e003977559 apiclient: Version client funcs 2021-03-25 15:39:48 +01:00
Łukasz Magiera
65dcec0ebc api client: Use versioned api packages 2021-03-23 19:15:53 +01:00
Łukasz Magiera
c41777dcd2
API proxy struct codegen (#5854)
* mostly working api proxy gen

* api: Consistent api names

* fix docsgen

* regenerate api struct

* api: expand external interfaces

* Add missing gen files

* apigen: fix perm detection

* api: Move perm tags to the interface

* gofmt

* worker perms

* docsgen

* docsgen: ignore tag comments

* apigen: add codegen warning

* gofmt

* missing actor type

* docsgen

* make linter happy

* fix lint

* apigen: use directives for tags

* docsgen

* regen openrpc docs
2021-03-23 13:42:56 +01:00
Łukasz Magiera
58e49e3259 Move api client builders to a cliutil package 2021-03-05 21:08:41 +01:00