diff options
Diffstat (limited to 'tests/Network')
-rw-r--r-- | tests/Network/BitTorrent/DHT/QuerySpec.hs | 4 | ||||
-rw-r--r-- | tests/Network/BitTorrent/DHT/SessionSpec.hs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/Network/BitTorrent/DHT/QuerySpec.hs b/tests/Network/BitTorrent/DHT/QuerySpec.hs index 81c3b45b..6b3b5485 100644 --- a/tests/Network/BitTorrent/DHT/QuerySpec.hs +++ b/tests/Network/BitTorrent/DHT/QuerySpec.hs | |||
@@ -28,7 +28,7 @@ nullLogger _ _ _ _ = return () | |||
28 | 28 | ||
29 | simpleDHT :: [NodeHandler IPv4] -> DHT IPv4 a -> IO a | 29 | simpleDHT :: [NodeHandler IPv4] -> DHT IPv4 a -> IO a |
30 | simpleDHT hs m = | 30 | simpleDHT hs m = |
31 | bracket (newNode hs def myAddr nullLogger) closeNode $ \ node -> | 31 | bracket (newNode hs def myAddr nullLogger Nothing) closeNode $ \ node -> |
32 | runDHT node m | 32 | runDHT node m |
33 | 33 | ||
34 | getBootInfo :: IO (NodeInfo IPv4) | 34 | getBootInfo :: IO (NodeInfo IPv4) |
@@ -102,4 +102,4 @@ spec = parallel $ do | |||
102 | sourceList [startNodes] $= | 102 | sourceList [startNodes] $= |
103 | search entryHash (getPeersQ entryHash) $= | 103 | search entryHash (getPeersQ entryHash) $= |
104 | CL.concat $$ CL.take 10 | 104 | CL.concat $$ CL.take 10 |
105 | L.length peers `shouldBe` 10 \ No newline at end of file | 105 | L.length peers `shouldBe` 10 |
diff --git a/tests/Network/BitTorrent/DHT/SessionSpec.hs b/tests/Network/BitTorrent/DHT/SessionSpec.hs index 8c536352..ef844b31 100644 --- a/tests/Network/BitTorrent/DHT/SessionSpec.hs +++ b/tests/Network/BitTorrent/DHT/SessionSpec.hs | |||
@@ -26,7 +26,7 @@ myAddr = "127.0.0.1:60000" | |||
26 | 26 | ||
27 | simpleDHT :: DHT IPv4 a -> IO a | 27 | simpleDHT :: DHT IPv4 a -> IO a |
28 | simpleDHT m = | 28 | simpleDHT m = |
29 | bracket (newNode defaultHandlers def myAddr nullLogger) closeNode $ \ node -> | 29 | bracket (newNode defaultHandlers def myAddr nullLogger Nothing) closeNode $ \ node -> |
30 | runDHT node m | 30 | runDHT node m |
31 | 31 | ||
32 | isRight :: Either a b -> Bool | 32 | isRight :: Either a b -> Bool |
@@ -43,7 +43,7 @@ spec :: Spec | |||
43 | spec = do | 43 | spec = do |
44 | describe "session" $ do | 44 | describe "session" $ do |
45 | it "is active until closeNode called" $ do | 45 | it "is active until closeNode called" $ do |
46 | node <- newNode [] def myAddr nullLogger | 46 | node <- newNode [] def myAddr nullLogger Nothing |
47 | runDHT node monadActive `shouldReturn` True | 47 | runDHT node monadActive `shouldReturn` True |
48 | runDHT node monadActive `shouldReturn` True | 48 | runDHT node monadActive `shouldReturn` True |
49 | closeNode node | 49 | closeNode node |
@@ -106,4 +106,4 @@ spec = do | |||
106 | 106 | ||
107 | describe "(<@>) operator" $ do | 107 | describe "(<@>) operator" $ do |
108 | it "" $ | 108 | it "" $ |
109 | pending \ No newline at end of file | 109 | pending |