summaryrefslogtreecommitdiff
path: root/Omni/Agent.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Omni/Agent.hs')
-rw-r--r--Omni/Agent.hs17
1 files changed, 15 insertions, 2 deletions
diff --git a/Omni/Agent.hs b/Omni/Agent.hs
index d53bccd..6086584 100644
--- a/Omni/Agent.hs
+++ b/Omni/Agent.hs
@@ -10,13 +10,16 @@ module Omni.Agent where
import Alpha
import qualified Data.Text as Text
import qualified Omni.Agent.Core as Core
+import qualified Omni.Agent.Log as Log
import qualified Omni.Agent.Worker as Worker
import qualified Omni.Cli as Cli
import qualified Omni.Test as Test
import qualified System.Console.Docopt as Docopt
main :: IO ()
-main = Cli.main plan
+main = do
+ putStrLn "DEBUG: Running Agent"
+ Cli.main plan
plan :: Cli.Plan ()
plan =
@@ -63,7 +66,17 @@ move args
| otherwise = putStrLn (Cli.usage help)
test :: Test.Tree
-test = Test.group "Omni.Agent" [unitTests]
+test = Test.group "Omni.Agent" [unitTests, logTests]
+
+logTests :: Test.Tree
+logTests =
+ Test.group
+ "Log tests"
+ [ Test.unit "Log.emptyStatus" <| do
+ let s = Log.emptyStatus "worker-1"
+ Log.statusWorker s Test.@?= "worker-1"
+ Log.statusFiles s Test.@?= 0
+ ]
unitTests :: Test.Tree
unitTests =