mirror of
https://github.com/typeable/bloodhound.git
synced 2024-10-26 08:33:00 +03:00
more specific sub-agg test; updated plain stack.yaml
This commit is contained in:
parent
895df29b9f
commit
576e25dfb3
11
stack.yaml
11
stack.yaml
@ -3,13 +3,4 @@ packages:
|
||||
- '.'
|
||||
extra-deps:
|
||||
- quickcheck-properties-0.1
|
||||
|
||||
# - http-client-0.5.0
|
||||
# - fail-4.9.0.0
|
||||
# - http-types-0.9
|
||||
# - attoparsec-0.13.0.1
|
||||
# - doctest-0.10.1
|
||||
# - semigroups-0.18.0.1
|
||||
# - uri-bytestring-0.1.9
|
||||
# - temporary-resourcet-0.1.0.0
|
||||
resolver: nightly-2016-08-20
|
||||
resolver: nightly-2017-01-30
|
||||
|
@ -1314,8 +1314,9 @@ main = hspec $ do
|
||||
reply <- searchByIndex testIndex search
|
||||
let result = decode (responseBody reply) :: Maybe (SearchResult Tweet)
|
||||
usersAggResults = result >>= aggregations >>= toTerms "users"
|
||||
subAddResultsExists = maybe (Left False) Right $ ((isJust . termsAggs . head . buckets) <$> usersAggResults)
|
||||
liftIO $ (subAddResultsExists) `shouldBe` Right True
|
||||
subAggResults = usersAggResults >>= (listToMaybe . buckets) >>= termsAggs >>= toTerms "age_agg"
|
||||
subAddResultsExists = isJust subAggResults
|
||||
liftIO $ (subAddResultsExists) `shouldBe` True
|
||||
|
||||
it "returns cardinality aggregation results" $ withTestEnv $ do
|
||||
_ <- insertData
|
||||
|
@ -1129,8 +1129,9 @@ main = hspec $ do
|
||||
reply <- searchByIndex testIndex search
|
||||
let result = decode (responseBody reply) :: Maybe (SearchResult Tweet)
|
||||
usersAggResults = result >>= aggregations >>= toTerms "users"
|
||||
subAddResultsExists = maybe (Left False) Right $ ((isJust . termsAggs . head . buckets) <$> usersAggResults)
|
||||
liftIO $ (subAddResultsExists) `shouldBe` Right True
|
||||
subAggResults = usersAggResults >>= (listToMaybe . buckets) >>= termsAggs >>= toTerms "age_agg"
|
||||
subAddResultsExists = isJust subAggResults
|
||||
liftIO $ (subAddResultsExists) `shouldBe` True
|
||||
|
||||
it "returns cardinality aggregation results" $ withTestEnv $ do
|
||||
_ <- insertData
|
||||
|
Loading…
Reference in New Issue
Block a user