summaryrefslogtreecommitdiff
path: root/tests/Network
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Network')
-rw-r--r--tests/Network/BitTorrent/DHT/QuerySpec.hs4
-rw-r--r--tests/Network/BitTorrent/DHT/RoutingSpec.hs2
-rw-r--r--tests/Network/BitTorrent/Exchange/SessionSpec.hs4
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/Network/BitTorrent/DHT/QuerySpec.hs b/tests/Network/BitTorrent/DHT/QuerySpec.hs
index 33114b40..d25bd120 100644
--- a/tests/Network/BitTorrent/DHT/QuerySpec.hs
+++ b/tests/Network/BitTorrent/DHT/QuerySpec.hs
@@ -18,7 +18,7 @@ import Network.BitTorrent.DHT.TestData
18 18
19 19
20myAddr :: NodeAddr IPv4 20myAddr :: NodeAddr IPv4
21myAddr = "0.0.0.0:8000" 21myAddr = "0.0.0.0:0"
22 22
23nullLogger :: LogFun 23nullLogger :: LogFun
24nullLogger _ _ _ _ = return () 24nullLogger _ _ _ _ = return ()
@@ -37,7 +37,7 @@ getBootInfo = do
37 simpleDHT [] $ pingQ startAddr 37 simpleDHT [] $ pingQ startAddr
38 38
39spec :: Spec 39spec :: Spec
40spec = do 40spec = parallel $ do
41 describe "environment" $ do 41 describe "environment" $ do
42 describe "test node" $ do 42 describe "test node" $ do
43 it "is alive" $ do 43 it "is alive" $ do
diff --git a/tests/Network/BitTorrent/DHT/RoutingSpec.hs b/tests/Network/BitTorrent/DHT/RoutingSpec.hs
index 788c4341..c4a33357 100644
--- a/tests/Network/BitTorrent/DHT/RoutingSpec.hs
+++ b/tests/Network/BitTorrent/DHT/RoutingSpec.hs
@@ -27,7 +27,7 @@ runSimulation :: Eq ip => Env ip -> Routing ip a -> Maybe a
27runSimulation e m = evalState (runRouting ping closest timestamp m) e 27runSimulation e m = evalState (runRouting ping closest timestamp m) e
28 where 28 where
29 ping addr = gets (L.elem addr . network) 29 ping addr = gets (L.elem addr . network)
30 closest nid = undefined 30 closest nid = error "runSimulation"
31 timestamp = gets currentTime 31 timestamp = gets currentTime
32 32
33instance Arbitrary ip => Arbitrary (Env ip) where 33instance Arbitrary ip => Arbitrary (Env ip) where
diff --git a/tests/Network/BitTorrent/Exchange/SessionSpec.hs b/tests/Network/BitTorrent/Exchange/SessionSpec.hs
index 745649fe..f80fc864 100644
--- a/tests/Network/BitTorrent/Exchange/SessionSpec.hs
+++ b/tests/Network/BitTorrent/Exchange/SessionSpec.hs
@@ -4,7 +4,7 @@ import Test.Hspec
4 4
5import Data.Torrent 5import Data.Torrent
6import Network.BitTorrent.Core 6import Network.BitTorrent.Core
7import Network.BitTorrent.Exchange.Session as S 7import Network.BitTorrent.Exchange.Session
8 8
9import Config 9import Config
10 10
@@ -20,7 +20,7 @@ spec = do
20 Torrent {..} <- getTestTorrent 20 Torrent {..} <- getTestTorrent
21 myAddr <- getMyAddr 21 myAddr <- getMyAddr
22 ses <- newSession nullLogger myAddr "" tInfoDict 22 ses <- newSession nullLogger myAddr "" tInfoDict
23 S.insert addr ses 23 connect addr ses
24 dict <- waitMetadata ses 24 dict <- waitMetadata ses
25 closeSession ses 25 closeSession ses
26 dict `shouldBe` tInfoDict 26 dict `shouldBe` tInfoDict