diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-11-29 21:40:16 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-11-29 21:40:16 +0100 |
commit | 1670b628cc7accea1c7ecd9359a7dccb6bd50a45 (patch) | |
tree | efad1d67a737fe654acb8ccfeb3b06fcf767de63 /src/Run.hs | |
parent | 56878ad193071539a1fd83298c4509fe21b880fd (diff) |
Represent root network as an internal variable
Diffstat (limited to 'src/Run.hs')
-rw-r--r-- | src/Run.hs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |