Commit Graph

14550 Commits

Author SHA1 Message Date
Nikola Divic
e5ac8662c8 test: chain gas-price cli command
Contains some funny mocking logic, because estimate gas price is called
multiple times (for various nblocks) and I wanted to make it as flexible
as possible.
2022-02-10 21:55:09 +01:00
Nikola Divic
c0f89e5b2d test: chain export cli command
Modified ChainExportCmd to use io.WriterCloser instead of os.File so
it the file can be mocked in unit tests, without side effects to the FS.
2022-02-10 18:18:31 +01:00
Nikola Divic
b536dfa552 test: chain bisect cli command 2022-02-10 15:46:06 +01:00
Nikola Divic
6bc2ee2735 test: chain get cli command
Cover the essential function execution paths, no time for every -as-type
combination.
2022-02-10 14:49:38 +01:00
Nikola Divic
b3f7db7a15 test: chain list (love) cli command
Some "funky" string matching in this one, but I think that's ok.

Chain is love. ❤️
2022-02-10 00:36:38 +01:00
Nikola Divic
4e37131602 test: chain inspect-usage cli command 2022-02-09 23:47:40 +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
e797ec138d test: chain getmessage cli command
I also added some helper functions for mocking in the types/mock pkg
2022-02-09 17:29:29 +01:00
Nikola Divic
a923d7c884 test: chain stat-obj cli command
Test expected output with respect to the --base flag
2022-02-09 16:22:52 +01:00
Nikola Divic
c0f47e5eed test: chain delete-obj cli command
Contains two subtests, that check if the --really-do-it flag (force)
is respected, since removing wrong objects may lead to sync issues.
2022-02-09 15:56:13 +01:00
Nikola Divic
1cd590ace9 test: chain read-obj
Simple test that checks if this CLI method prints the IPLD node referenced
by the given CID encoded in hexadecimal.
2022-02-09 15:29:10 +01:00
Nikola Divic
78649d45b9 test: cli chain getblock command
Unit test for the cli `chain getblock` command.
Tests if output is JSON  in the expected format.
2022-02-08 18:24:45 +01:00
Nikola Divic
35918cbd7e Merge branch 'master' of https://github.com/filecoin-project/lotus into cli-chain-tests 2022-02-08 17:25:45 +01:00
Łukasz Magiera
b27196b770
Merge pull request #8047 from filecoin-project/asr/params
chore: update build and deps
2022-02-08 16:22:12 +00: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
Aayush Rajasekaran
f476aa937e update to latest FFI 2022-02-08 10:45:58 -05:00
Jennifer Wang
932110fb93 update the param version 2022-02-08 10:44:36 -05:00
Jennifer Wang
1865e8f088 reset butterfly net 2022-02-08 10:43:51 -05:00
Jennifer Wang
fdae1face5 Set Calib OhSnap upgrade epoch 2022-02-08 10:43:43 -05:00
Aayush Rajasekaran
ad39d8707d build: add empty sector update params 2022-02-08 10:41:18 -05:00
Łukasz Magiera
b38adaa736
Merge pull request #8044 from filecoin-project/deps/update-libp2p
update libp2p to v0.18.0-rc4
2022-02-08 10:52:56 +00:00
vyzo
80e9f76261 update libp2p to v0.18.0-rc4 2022-02-08 11:51:14 +02:00
Łukasz Magiera
d9c763437e
Merge pull request #8022 from filecoin-project/deps/update-libp2p
update go-libp2p to v0.18.0-rc3
2022-02-03 18:42:04 +00:00
vyzo
e78c4ab9b3 update go-libp2p to v0.18.0-rc3 2022-02-03 19:32:30 +02:00
Łukasz Magiera
51643caf60
Merge pull request #7835 from filecoin-project/bloxico/system-test-matrix
misc: api: Annotate lotus tests according to listed behaviors
2022-01-31 12:23:09 +01:00
vyzo
ff10e0eaf1
Merge pull request #7999 from filecoin-project/feat/splistore-refactors
some basic splitstore refactors
2022-01-28 13:55:16 +02:00
Darko Brdareski
6b8f526df3 Fix merge 2022-01-27 11:06:04 +01:00
Darko Brdareski
e51ce5c508 Merge remote-tracking branch 'upstream/master' into bloxico/system-test-matrix 2022-01-27 10:57:56 +01:00
Darko Brdareski
8c41e17c93 Fix typo in client_test annotations 2022-01-27 10:56:33 +01:00
vyzo
f07ce297f6 optimize slice allocations in walk 2022-01-26 21:55:24 +02:00
vyzo
a87239e802 avoid extraneous assignment 2022-01-26 21:48:03 +02:00
Łukasz Magiera
3e6c482229
Merge pull request #8005 from filecoin-project/feat/mpool-cache-statenonces
feat: mpool: Cache state nonces
2022-01-26 16:22:12 +01:00
Łukasz Magiera
176ecd4c3b mpool: Cache state nonces 2022-01-26 15:39:58 +01:00
vyzo
fe47d6a1a4 fix check and warmup for parallel walk 2022-01-26 09:01:51 +02:00
vyzo
10f2445a99 use minimum of 2 workers 2022-01-25 21:37:48 +02:00
Aayush Rajasekaran
f1b24598f5
Merge pull request #7998 from filecoin-project/arajasek-patch-3
chore: sealer: quieten a log
2022-01-25 12:56:30 -05:00
Aayush Rajasekaran
2d0929e305
remove a log 2022-01-25 12:55:56 -05:00
vyzo
8e01e73de4 dynamically compute number of workers for parallel chain walk 2022-01-25 19:47:58 +02:00
vyzo
7c8edf5632 parallelize walkChain 2022-01-25 17:29:02 +02:00
vyzo
25284b5325 refactor: eliminate distinction between markset and markset visitors 2022-01-25 16:31:45 +02:00
Łukasz Magiera
06d2ac65b5
Merge pull request #7995 from filecoin-project/arajasek-patch-2
chore: build: make the OhSnap epoch configurable by an envvar for devnets
2022-01-25 10:51:26 +01:00
Łukasz Magiera
e3888b38bb
Merge pull request #7993 from filecoin-project/arajasek-patch-1
chore: chain: fix log
2022-01-25 10:50:47 +01:00
Aayush Rajasekaran
92e6f29cc8
chore: sealer: quieten a log 2022-01-24 18:28:52 -05:00
raulk
a2468656e4
Merge pull request #7996 from filecoin-project/raulk/tvx-network-version
tvx: supply network version when extracting messages.
2022-01-24 20:50:51 +00:00
Aayush Rajasekaran
0358ad83cb
Update params_2k.go 2022-01-24 15:44:20 -05:00
Raúl Kripalani
3aab77af8d tvx: add missing network upgrade names. 2022-01-24 20:13:04 +00:00
Raúl Kripalani
85447abe7f tvx: supply network version when extracting messages. 2022-01-24 20:06:07 +00:00
Aayush Rajasekaran
71c6d05902
chore: chain: fix log 2022-01-24 11:18:01 -05:00
Łukasz Magiera
6080431383
Merge pull request #7986 from filecoin-project/asr/more-fixes-master
fix: sealer: manager should lock Unsealed for ReplicaUpdate
2022-01-21 17:38:23 +01:00
Aayush
5cafdc2f29 fix: sealer: manager should lock Unsealed for ReplicaUpdate 2022-01-21 11:12:12 -05:00