Skip to content

Commit

Permalink
itests: Fix ccupgrade post test
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Mar 18, 2022
1 parent d08773d commit 1d2cc18
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 38 deletions.
5 changes: 0 additions & 5 deletions .circleci/config.yml
Expand Up @@ -786,11 +786,6 @@ workflows:
suite: itest-batch_deal
target: "./itests/batch_deal_test.go"

- test:
name: test-itest-ccupgrade_post
suite: itest-ccupgrade_post
target: "./itests/ccupgrade_post_test.go"

- test:
name: test-itest-ccupgrade
suite: itest-ccupgrade
Expand Down
32 changes: 0 additions & 32 deletions itests/ccupgrade_post_test.go

This file was deleted.

26 changes: 25 additions & 1 deletion itests/ccupgrade_test.go
Expand Up @@ -29,7 +29,31 @@ func TestCCUpgrade(t *testing.T) {
//stm: @MINER_SECTOR_LIST_001
kit.QuietMiningLogs()

runTestCCUpgrade(t)
var n *kit.TestFullNode

t.Run("upgrade", func(t *testing.T) {
n = runTestCCUpgrade(t)
})

t.Run("post", func(t *testing.T) {
if n == nil {
t.Fatal("post test depends on 'upgrade' test running first")
}

ctx := context.Background()
ts, err := n.ChainHead(ctx)
require.NoError(t, err)
start := ts.Height()
// wait for a full proving period
t.Log("waiting for chain")

n.WaitTillChain(ctx, func(ts *types.TipSet) bool {
if ts.Height() > start+abi.ChainEpoch(2880) {
return true
}
return false
})
})
}

func runTestCCUpgrade(t *testing.T) *kit.TestFullNode {
Expand Down

0 comments on commit 1d2cc18

Please sign in to comment.