Sha256: b69da6a21326b4df25baa5419f0b0979d38dca80a975d59aa009ac38dfe723f7

Contents?: true

Size: 878 Bytes

Versions: 8

Compression:

Stored size: 878 Bytes

Contents

# Licensed to Elasticsearch B.V under one or more agreements.
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information

require 'spec_helper'

describe 'client.cluster#reroute' do

  let(:expected_args) do
    [
        'POST',
        '_cluster/reroute',
        {},
        {},
        nil
    ]
  end

  it 'performs the request' do
    expect(client_double.cluster.reroute).to eq({})
  end

  context 'when a body is specified' do

    let(:expected_args) do
      [
          'POST',
          '_cluster/reroute',
          {},
          { commands: [ move: { index: 'myindex', shard: 0 }] },
          nil
      ]
    end

    it 'performs the request' do
      expect(client_double.cluster.reroute(body: { commands: [ move: { index: 'myindex', shard: 0 }] })).to eq({})
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
elasticsearch-api-6.8.3 spec/elasticsearch/api/actions/cluster/reroute_spec.rb
elasticsearch-api-6.8.2 spec/elasticsearch/api/actions/cluster/reroute_spec.rb
elasticsearch-api-7.6.0 spec/elasticsearch/api/actions/cluster/reroute_spec.rb
elasticsearch-api-7.6.0.pre spec/elasticsearch/api/actions/cluster/reroute_spec.rb
elasticsearch-api-7.5.0 spec/elasticsearch/api/actions/cluster/reroute_spec.rb
elasticsearch-api-7.5.0.pre.pre spec/elasticsearch/api/actions/cluster/reroute_spec.rb
elasticsearch-api-7.4.0 spec/elasticsearch/api/actions/cluster/reroute_spec.rb
elasticsearch-api-7.3.0 spec/elasticsearch/api/actions/cluster/reroute_spec.rb