summaryrefslogtreecommitdiff
path: root/src/Run.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Run.hs')
-rw-r--r--src/Run.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Run.hs b/src/Run.hs
index fd02af3..54fdba6 100644
--- a/src/Run.hs
+++ b/src/Run.hs
@@ -59,8 +59,7 @@ runTest out opts test variables = do
, teGDB = fst <$> mgdb
}
tstate = TestState
- { tsNetwork = error "network not initialized"
- , tsVars = builtins
+ { tsVars = builtins
, tsNodePacketLoss = M.empty
, tsDisconnectedUp = S.empty
, tsDisconnectedBridge = S.empty
@@ -184,7 +183,8 @@ withInternet inner = do
testDir <- asks $ optTestDir . teOptions . fst
inet <- newInternet testDir
res <- withNetwork (inetRoot inet) $ \net -> do
- local (fmap $ \s -> s { tsNetwork = net }) $ inner net
+ withTypedVar rootNetworkVar net $ do
+ inner net
delInternet inet
return res