diff options
Diffstat (limited to 'tests/Network')
-rw-r--r-- | tests/Network/BitTorrent/DHT/QuerySpec.hs | 4 | ||||
-rw-r--r-- | tests/Network/BitTorrent/DHT/RoutingSpec.hs | 2 | ||||
-rw-r--r-- | tests/Network/BitTorrent/Exchange/SessionSpec.hs | 4 |
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 | ||
20 | myAddr :: NodeAddr IPv4 | 20 | myAddr :: NodeAddr IPv4 |
21 | myAddr = "0.0.0.0:8000" | 21 | myAddr = "0.0.0.0:0" |
22 | 22 | ||
23 | nullLogger :: LogFun | 23 | nullLogger :: LogFun |
24 | nullLogger _ _ _ _ = return () | 24 | nullLogger _ _ _ _ = return () |
@@ -37,7 +37,7 @@ getBootInfo = do | |||
37 | simpleDHT [] $ pingQ startAddr | 37 | simpleDHT [] $ pingQ startAddr |
38 | 38 | ||
39 | spec :: Spec | 39 | spec :: Spec |
40 | spec = do | 40 | spec = 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 | |||
27 | runSimulation e m = evalState (runRouting ping closest timestamp m) e | 27 | runSimulation 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 | ||
33 | instance Arbitrary ip => Arbitrary (Env ip) where | 33 | instance 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 | ||
5 | import Data.Torrent | 5 | import Data.Torrent |
6 | import Network.BitTorrent.Core | 6 | import Network.BitTorrent.Core |
7 | import Network.BitTorrent.Exchange.Session as S | 7 | import Network.BitTorrent.Exchange.Session |
8 | 8 | ||
9 | import Config | 9 | import 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 |