adjust tests to new NodeState

This commit is contained in:
Trolli Schmittlauch 2020-04-01 13:26:42 +02:00
parent 0e33d442f9
commit ea6ebe590d

View file

@ -33,7 +33,7 @@ spec = do
-- edge cases
(toNodeID 5001 - toNodeID 2^(255::Integer) < 5001) `shouldBe` True
(toNodeID 5001 - toNodeID 2^(255::Integer) - 1) < 5001 `shouldBe` False
it "throws an exception when @toNodeID@ on out-of-bound values" $
it "throws an exception when @toNodeID@ on out-of-bound values"
pending
it "can be generated" $ do
genNodeIDBS ip nodeDomain vs `shouldBe` "\ACK\211\183&S\GS\214\247Xn8\216\232\195\247\162\182\253\210\SOHG7I\194\251\196\130\142RSx\219"
@ -64,6 +64,7 @@ spec = do
, kNeighbours = 3
, lNumBestNodes = 3
, pNumParallelQueries = 2
, jEntriesPerSlice = 2
}
print ns
it "can be initialised partly and then modified later" $ do
@ -79,6 +80,7 @@ spec = do
, kNeighbours = 3
, lNumBestNodes = 3
, pNumParallelQueries = 2
, jEntriesPerSlice = 2
}
nsReady = ns {
nid = genNodeID (ipAddr ns) (domain ns) 3