Skip to content

Commit

Permalink
CAD-403: failing testcase
Browse files Browse the repository at this point in the history
        expected: fromList []
         but got: fromList [("mapSubtrace",fromList [("#messagecounters.monitoring",Object (fromList [("subtrace",String "NoTrace")])),("#messagecounters.ekgview",Object (fromList [("subtrace",String "NoTrace")])),("#messagecounters.aggregation",Object (fromList [("subtrace",String "NoTrace")])),("#messagecounters.graylog",Object (fromList [("subtrace",String "NoTrace")])),("#messagecounters.katip",Object (fromList [("subtrace",String "NoTrace")])),("#messagecounters.switchboard",Object (fromList [("subtrace",String "NoTrace")]))])]
  • Loading branch information
deepfire committed Jan 16, 2020
1 parent 15e7df2 commit d4bebf3
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion iohk-monitoring/test/Cardano/BM/Test/Configuration.lhs
Expand Up @@ -64,7 +64,8 @@ unitTests = testGroup "Unit tests" [
testCase "static representation" unitConfigurationStaticRepresentation
, testCase "parsed representation" unitConfigurationParsedRepresentation
, testCase "parsed configuration" unitConfigurationParsed
, testCase "export configuration" unitConfigurationExport
, testCase "export configuration: from file" unitConfigurationExport
, testCase "export configuration: defaultConfigStdout" unitConfigurationExportStdout
, testCase "check scribe caching" unitConfigurationCheckScribeCache
, testCase "test ops on Configuration" unitConfigurationOps
]
Expand Down Expand Up @@ -379,6 +380,40 @@ unitConfigurationExport = do
cfgInternal' @?= cfgInternal
unitConfigurationExportStdout :: Assertion
unitConfigurationExportStdout = do
cfg <- defaultConfigStdout
cfg' <- withSystemTempFile "config.yaml-1213" $ \file0 _ -> do
let file = file0 <> "-copy"
exportConfiguration cfg file
setup file
cfgInternal <- readMVar $ getCG cfg
cfgInternal' <- readMVar $ getCG cfg'
cgMinSeverity cfgInternal' @?= cgMinSeverity cfgInternal
cgDefRotation cfgInternal' @?= cgDefRotation cfgInternal
cgMapSeverity cfgInternal' @?= cgMapSeverity cfgInternal
cgMapSubtrace cfgInternal' @?= cgMapSubtrace cfgInternal
cgOptions cfgInternal' @?= cgOptions cfgInternal
cgMapBackend cfgInternal' @?= cgMapBackend cfgInternal
cgDefBackendKs cfgInternal' @?= cgDefBackendKs cfgInternal
cgSetupBackends cfgInternal' @?= cgSetupBackends cfgInternal
cgMapScribe cfgInternal' @?= cgMapScribe cfgInternal
cgMapScribeCache cfgInternal' @?= cgMapScribeCache cfgInternal
cgDefScribes cfgInternal' @?= cgDefScribes cfgInternal
cgSetupScribes cfgInternal' @?= cgSetupScribes cfgInternal
cgMapAggregatedKind cfgInternal' @?= cgMapAggregatedKind cfgInternal
cgDefAggregatedKind cfgInternal' @?= cgDefAggregatedKind cfgInternal
cgMonitors cfgInternal' @?= cgMonitors cfgInternal
cgPortEKG cfgInternal' @?= cgPortEKG cfgInternal
cgPortGraylog cfgInternal' @?= cgPortGraylog cfgInternal
cgBindAddrPrometheus cfgInternal' @?= cgBindAddrPrometheus cfgInternal
cgPortGUI cfgInternal' @?= cgPortGUI cfgInternal
cgLogOutput cfgInternal' @?= cgLogOutput cfgInternal
cfgInternal' @?= cfgInternal
\end{code}

Test caching and inheritance of Scribes.
Expand Down

0 comments on commit d4bebf3

Please sign in to comment.