File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 1499
1499
end
1500
1500
end
1501
1501
1502
- context 'drop_error_types config option ' do
1502
+ describe 'drop_error_types' do
1503
1503
1504
- let ( :error_type ) { 'role_restriction_exception ' }
1504
+ let ( :error_type ) { 'index_closed_exception ' }
1505
1505
1506
1506
let ( :options ) { super ( ) . merge ( 'drop_error_types' => [ error_type ] ) }
1507
1507
1511
1511
1512
1512
let ( :error_code ) { 403 }
1513
1513
1514
+ let ( :event_action_tuples ) { subject . map_events ( events ) }
1515
+
1514
1516
let ( :bulk_response ) do
1515
1517
{
1516
1518
"took" => 1 , "ingest_took" => 11 , "errors" => true , "items" =>
1528
1530
1529
1531
context 'DLQ is enabled' do
1530
1532
1531
- it 'does not write the event to the DLQ' do
1533
+ before ( :each ) do
1532
1534
allow ( subject ) . to receive ( :dlq_enabled? ) . and_return ( true )
1533
- expect ( dlq_writer ) . not_to receive ( :write )
1535
+ end
1534
1536
1535
- event_action_tuples = subject . map_events ( events )
1537
+ it 'does not write the event to the DLQ' do
1538
+ expect ( dlq_writer ) . not_to receive ( :write )
1536
1539
subject . send ( :submit , event_action_tuples )
1537
1540
end
1538
1541
end
1539
1542
1540
1543
context 'DLQ is not enabled' do
1541
1544
1542
- it 'does not write the event to the DLQ' do
1545
+ before ( :each ) do
1543
1546
allow ( subject ) . to receive ( :dlq_enabled? ) . and_return ( false )
1544
- expect ( dlq_writer ) . not_to receive ( :write )
1547
+ end
1545
1548
1546
- event_action_tuples = subject . map_events ( events )
1549
+ it 'does not write the event to the DLQ' do
1550
+ expect ( dlq_writer ) . not_to receive ( :write )
1547
1551
subject . send ( :submit , event_action_tuples )
1548
1552
end
1549
1553
end
You can’t perform that action at this time.
0 commit comments