Skip to content

Commit

Permalink
fixup! fixup! feat: stmgr: add env to disable premigrations
Browse files Browse the repository at this point in the history
  • Loading branch information
travisperson committed Feb 16, 2023
1 parent b379b47 commit 0e18e96
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions chain/stmgr/forks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,9 +543,12 @@ func TestDisablePreMigration(t *testing.T) {
cg, err := gen.NewGenerator()
require.NoError(t, err)

os.Setenv(EnvDisablePreMigrations, "1")
err = os.Setenv(EnvDisablePreMigrations, "1")
require.NoError(t, err)

defer func() {
os.Unsetenv(EnvDisablePreMigrations)
err := os.Unsetenv(EnvDisablePreMigrations)
require.NoError(t, err)
}()

counter := make(chan struct{}, 10)
Expand All @@ -569,7 +572,6 @@ func TestDisablePreMigration(t *testing.T) {
PreMigration: func(ctx context.Context, _ *StateManager, _ MigrationCache,
_ cid.Cid, _ abi.ChainEpoch, _ *types.TipSet) error {
panic("should be skipped")
return nil
},
}}},
},
Expand Down

0 comments on commit 0e18e96

Please sign in to comment.