git.iko.soy/typeable/bloodhound
on master help sign in
Fix busted doctests for updateIndexAliases
commitbb72983e48d6fa1d8bcffb806f3a58dcf49947d9 authorMichael Xavier <michael@michaelxavier.net> dateWed 4 Nov 2015, 08:35 (11 years ago) parent6faa544
1 file changed+8−3
src/Database/Bloodhound/Client.hs+8−3
src/Database/Bloodhound/Client.hs+8−3
@@ -355,12 +355,17 @@ closeIndex = openOrCloseIndexes CloseIndex
355355-- table. Operations are atomic. Explained in further detail at
356356-- <https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>
357357--
358−-- >>> let aliasName = IndexName "twitter-alias"
359−-- >>> let iAlias = IndexAlias testIndex (IndexAliasName aliasName)
358+-- >>> let src = IndexName "a-real-index"
359+-- >>> let aliasName = IndexName "an-alias"
360+-- >>> let iAlias = IndexAlias src (IndexAliasName aliasName)
360361-- >>> let aliasCreate = IndexAliasCreate Nothing Nothing
362+-- >>> respIsTwoHunna <$> runBH' (createIndex defaultIndexSettings src)
363+-- True
364+-- >>> runBH' $ indexExists src
365+-- True
361366-- >>> respIsTwoHunna <$> runBH' (updateIndexAliases (AddAlias iAlias aliasCreate :| []))
362367-- True
363−-- >> respIsTwoHunna <$> runBH' (indexExists aliasName)
368+-- >>> runBH' $ indexExists aliasName
364369-- True
365370updateIndexAliases :: MonadBH m => NonEmpty IndexAliasAction -> m Reply
366371updateIndexAliases actions = bindM2 post url (return body)