storagefsm: Test fsmPlanners map

This commit is contained in:
Łukasz Magiera 2020-11-26 10:58:07 +01:00
parent ba87cb4fa9
commit eeb38fa649

View File

@ -160,3 +160,18 @@ func TestPlanCommittingHandlesSectorCommitFailed(t *testing.T) {
require.Equal(t, CommitFailed, m.state.State)
}
func TestPlannerList(t *testing.T) {
for state := range ExistSectorStateList {
_, ok := fsmPlanners[state]
require.True(t, ok, "state %s", state)
}
for state := range fsmPlanners {
if state == UndefinedSectorState {
continue
}
_, ok := ExistSectorStateList[state]
require.True(t, ok, "state %s", state)
}
}