File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
src/Tests/Indices/IndexSettings Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 11using System ;
2+ using System . Linq ;
23using Elasticsearch . Net ;
4+ using FluentAssertions ;
35using Nest ;
46using Tests . Framework ;
57using Tests . Framework . Integration ;
@@ -33,5 +35,14 @@ protected override LazyResponses ClientUsage() => Calls(
3335 {
3436 Local = true
3537 } ;
38+
39+ protected override void ExpectResponse ( IGetIndexSettingsResponse response )
40+ {
41+ response . Indices . Should ( ) . NotBeEmpty ( ) ;
42+ var index = response . Indices . First ( ) . Value ;
43+ index . Should ( ) . NotBeNull ( ) ;
44+ index . Settings . NumberOfShards . Should ( ) . HaveValue ( ) . And . BeGreaterThan ( 0 ) ;
45+ index . Settings . NumberOfReplicas . Should ( ) . HaveValue ( ) ;
46+ }
3647 }
37- }
48+ }
Original file line number Diff line number Diff line change @@ -27,20 +27,23 @@ protected override LazyResponses ClientUsage() => Calls(
2727
2828 protected override object ExpectJson { get ; } = new Dictionary < string , object >
2929 {
30- { "index.blocks.write" , false }
30+ { "index.blocks.write" , false } ,
31+ { "index.number_of_replicas" , 2 }
3132 } ;
3233
3334 protected override Func < UpdateIndexSettingsDescriptor , IUpdateIndexSettingsRequest > Fluent => d => d
3435 . IndexSettings ( i => i
3536 . BlocksWrite ( false )
37+ . NumberOfReplicas ( 2 )
3638 ) ;
3739
3840 protected override UpdateIndexSettingsRequest Initializer => new UpdateIndexSettingsRequest
3941 {
4042 IndexSettings = new Nest . IndexSettings
4143 {
42- BlocksWrite = false
44+ BlocksWrite = false ,
45+ NumberOfReplicas = 2
4346 }
4447 } ;
4548 }
46- }
49+ }
You can’t perform that action at this time.
0 commit comments