Skip to content

Commit

Permalink
refactor(sut): Use initState in bug for dumblog
Browse files Browse the repository at this point in the history
  • Loading branch information
symbiont-daniel-gustafsson committed Mar 23, 2022
1 parent b34e32e commit 15ac6ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sut/dumblog/src/Dumblog/Journal/StateMachine.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ runCommand hasBug logger state@(InMemoryDumblog appLog ix) cmd = case cmd of
Read i
| hasBug && ix == 3 -> do
logger "Weird reset happend"
pure (InMemoryDumblog empty 0, Error (LBS8.pack "Dumblog!"))
pure (initState, Error (LBS8.pack "Dumblog!"))
| i < ix -> pure (state, OK (index appLog i))
| otherwise -> do
logger $ "Oh no, request not in log"
Expand Down

0 comments on commit 15ac6ed

Please sign in to comment.