@@ -2,6 +2,7 @@
22{-# LANGUAGE RecordWildCards #-}
33{-# LANGUAGE ScopedTypeVariables #-}
44{-# LANGUAGE TemplateHaskell #-}
5+{-# OPTIONS_GHC -fno-warn-orphans #-}
56module Main
67 ( main
78 ) where
@@ -45,7 +46,7 @@ main = defaultMain $ testGroup "katip-elasticsearch"
4546setupSearch :: IO (Scribe, IO ())
4647setupSearch = do
4748 bh recreateESSchema
48− mkEsScribe defaultEsScribeCfg { essAnnotateTypes = True } svr ixn mn DebugS V3
49+ mkEsScribe defaultEsScribeCfg { essAnnotateTypes = True, essIndexSettings = ixs } svr ixn mn DebugS V3
4950
5051
5152-------------------------------------------------------------------------------
@@ -62,7 +63,7 @@ esTests setup = testGroup "elasticsearch scribe"
6263 testCase "it flushes to elasticsearch" $ withTestLogging setup $ \done -> do
6364 $(logT) (ExampleCtx True) mempty InfoS "A test message"
6465 liftIO $ do
65− done
66+ void done
6667 logs <- getLogs
6768 length logs @?= 1
6869 let l = head logs
@@ -168,7 +169,8 @@ ixn = IndexName "katip-elasticsearch-tests"
168169
169170-------------------------------------------------------------------------------
170171ixs :: IndexSettings
171−ixs = defaultIndexSettings
172+ixs = defaultIndexSettings { indexShards = ShardCount 1
173+ , indexReplicas = ReplicaCount 1}
172174
173175-------------------------------------------------------------------------------
174176mn :: MappingName
@@ -181,7 +183,7 @@ mapping = () -- ehhh
181183
182184
183185-------------------------------------------------------------------------------
184−recreateESSchema :: BH IO Reply
186+recreateESSchema :: BH IO ()
185187recreateESSchema = dropESSchema >> createESSchema
186188
187189
@@ -191,9 +193,9 @@ dropESSchema = void $ deleteIndex ixn
191193
192194
193195-------------------------------------------------------------------------------
194−createESSchema :: BH IO Reply
195−createESSchema = do
196− createIndex ixs ixn
196+createESSchema :: BH IO ()
197+createESSchema = void $ do
198+ void $ createIndex ixs ixn
197199 putMapping ixn mn mapping
198200
199201