summaryrefslogtreecommitdiff
path: root/src/Run
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-11-29 21:40:16 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2024-11-29 21:40:16 +0100
commit1670b628cc7accea1c7ecd9359a7dccb6bd50a45 (patch)
treeefad1d67a737fe654acb8ccfeb3b06fcf767de63 /src/Run
parent56878ad193071539a1fd83298c4509fe21b880fd (diff)
Represent root network as an internal variable
Diffstat (limited to 'src/Run')
-rw-r--r--src/Run/Monad.hs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Run/Monad.hs b/src/Run/Monad.hs
index 512dd72..2882197 100644
--- a/src/Run/Monad.hs
+++ b/src/Run/Monad.hs
@@ -21,7 +21,6 @@ import Data.Scientific
import qualified Data.Text as T
import {-# SOURCE #-} GDB
-import {-# SOURCE #-} Network
import Network.Ip
import Output
import {-# SOURCE #-} Process
@@ -39,8 +38,7 @@ data TestEnv = TestEnv
}
data TestState = TestState
- { tsNetwork :: Network
- , tsVars :: [(VarName, SomeVarValue)]
+ { tsVars :: [(VarName, SomeVarValue)]
, tsDisconnectedUp :: Set NetworkNamespace
, tsDisconnectedBridge :: Set NetworkNamespace
, tsNodePacketLoss :: Map NetworkNamespace Scientific
@@ -94,8 +92,6 @@ instance MonadError Failed TestRun where
instance MonadEval TestRun where
lookupVar name = maybe (fail $ "variable not in scope: '" ++ unpackVarName name ++ "'") return =<< asks (lookup name . tsVars . snd)
- rootNetwork = asks $ tsNetwork . snd
-
withVar name value = local (fmap $ \s -> s { tsVars = ( name, someConstValue value ) : tsVars s })
instance MonadOutput TestRun where