write basic test affirming state change

This commit is contained in:
laser 2020-01-28 12:39:07 -08:00
parent e62515c042
commit debf107b54

View File

@ -83,3 +83,17 @@ func TestSeedRevert(t *testing.T) {
m.planSingle(SectorProving{})
require.Equal(m.t, m.state.State, api.Proving)
}
func TestPlanCommittingHandlesSectorCommitFailed(t *testing.T) {
m := test{
s: &Sealing{},
t: t,
state: &SectorInfo{State: api.Committing},
}
events := []statemachine.Event{{SectorCommitFailed{}}}
require.NoError(t, planCommitting(events, m.state))
require.Equal(t, api.SectorStates[api.CommitFailed], api.SectorStates[m.state.State])
}