summaryrefslogtreecommitdiff
path: root/tests/Network/BitTorrent/DHT/QuerySpec.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-01-21 19:03:16 -0500
committerjoe <joe@jerkface.net>2017-01-21 19:03:16 -0500
commitbff5b058b2caaeef335c2a50032df15fc23568f9 (patch)
tree0943e8771c06ae9f31fa45ce356c5adea7b6d1b8 /tests/Network/BitTorrent/DHT/QuerySpec.hs
parentb70401c23869b02a2fa1229b78e40aa824d9fbe2 (diff)
Test-suite build.
Diffstat (limited to 'tests/Network/BitTorrent/DHT/QuerySpec.hs')
-rw-r--r--tests/Network/BitTorrent/DHT/QuerySpec.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/Network/BitTorrent/DHT/QuerySpec.hs b/tests/Network/BitTorrent/DHT/QuerySpec.hs
index 6b3b5485..93f78263 100644
--- a/tests/Network/BitTorrent/DHT/QuerySpec.hs
+++ b/tests/Network/BitTorrent/DHT/QuerySpec.hs
@@ -34,7 +34,7 @@ simpleDHT hs m =
34getBootInfo :: IO (NodeInfo IPv4) 34getBootInfo :: IO (NodeInfo IPv4)
35getBootInfo = do 35getBootInfo = do
36 startAddr <- resolveHostName (L.head defaultBootstrapNodes) 36 startAddr <- resolveHostName (L.head defaultBootstrapNodes)
37 simpleDHT [] $ pingQ startAddr 37 simpleDHT [] $ fmap fst (pingQ startAddr)
38 38
39spec :: Spec 39spec :: Spec
40spec = parallel $ do 40spec = parallel $ do
@@ -55,14 +55,14 @@ spec = parallel $ do
55 it "findNode" $ do 55 it "findNode" $ do
56 startInfo <- getBootInfo 56 startInfo <- getBootInfo
57 _ <- simpleDHT [] $ do 57 _ <- simpleDHT [] $ do
58 nid <- asks thisNodeId 58 nid <- myNodeIdAccordingTo (read "8.8.8.8:6881")
59 findNodeQ nid startInfo 59 findNodeQ nid startInfo
60 return () 60 return ()
61 61
62 it "getPeers" $ do 62 it "getPeers" $ do
63 startInfo <- getBootInfo 63 startInfo <- getBootInfo
64 peers <- simpleDHT [] $ do 64 peers <- simpleDHT [] $ do
65 nid <- asks thisNodeId 65 nid <- myNodeIdAccordingTo (read "8.8.8.8:6881")
66 66
67 -- we should not run getPeers query on boot node, because 67 -- we should not run getPeers query on boot node, because
68 -- it may not support it 68 -- it may not support it