mirror of
https://github.com/typeable/bloodhound.git
synced 2024-11-29 12:54:15 +03:00
add tests for compression
This commit is contained in:
parent
142e864fb1
commit
b488c45217
@ -914,6 +914,7 @@ instance Arbitrary AnalyzerDefinition where arbitrary = sopArbitrary; shrink = g
|
||||
instance Arbitrary Analysis where arbitrary = sopArbitrary; shrink = genericShrink
|
||||
instance Arbitrary Tokenizer where arbitrary = sopArbitrary; shrink = genericShrink
|
||||
instance Arbitrary UpdatableIndexSetting where arbitrary = sopArbitrary; shrink = genericShrink
|
||||
instance Arbitrary Compression where arbitrary = sopArbitrary; shrink = genericShrink
|
||||
instance Arbitrary Bytes where arbitrary = sopArbitrary; shrink = genericShrink
|
||||
instance Arbitrary AllocationPolicy where arbitrary = sopArbitrary; shrink = genericShrink
|
||||
instance Arbitrary InitialShardCount where arbitrary = sopArbitrary; shrink = genericShrink
|
||||
@ -1648,6 +1649,25 @@ main = hspec $ do
|
||||
updates
|
||||
)
|
||||
|
||||
it "accepts default compression codec" $ when' (atleast es50) $ withTestEnv $ do
|
||||
_ <- deleteExampleIndex
|
||||
let updates = [CompressionSetting CompressionDefault]
|
||||
createResp <- createIndexWith (updates ++ [NumberOfReplicas (ReplicaCount 0)]) 1 testIndex
|
||||
liftIO $ validateStatus createResp 200
|
||||
getResp <- getIndexSettings testIndex
|
||||
liftIO $ getResp `shouldBe` Right
|
||||
(IndexSettingsSummary testIndex (IndexSettings (ShardCount 1) (ReplicaCount 0)) updates)
|
||||
|
||||
it "accepts best compression codec" $ when' (atleast es50) $ withTestEnv $ do
|
||||
_ <- deleteExampleIndex
|
||||
let updates = [CompressionSetting CompressionBest]
|
||||
createResp <- createIndexWith (updates ++ [NumberOfReplicas (ReplicaCount 0)]) 1 testIndex
|
||||
liftIO $ validateStatus createResp 200
|
||||
getResp <- getIndexSettings testIndex
|
||||
liftIO $ getResp `shouldBe` Right
|
||||
(IndexSettingsSummary testIndex (IndexSettings (ShardCount 1) (ReplicaCount 0)) updates)
|
||||
|
||||
|
||||
describe "Index Optimization" $ do
|
||||
it "returns a successful response upon completion" $ withTestEnv $ do
|
||||
_ <- createExampleIndex
|
||||
|
Loading…
Reference in New Issue
Block a user