Sha256: 000d15f4657d9cea77f50686e231f2bf6f27e44bf228b70f505d7754efce5922

Contents?: true

Size: 823 Bytes

Versions: 8

Compression:

Stored size: 823 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#rollover' do

  let(:expected_args) do
    [
        'POST',
        url,
        params,
        body,
        nil
    ]
  end

  let(:url) do
    'foo/_rollover'
  end

  let(:body) do
    nil
  end

  let(:params) do
    {}
  end

  it 'performs the request' do
    expect(client_double.indices.rollover(alias: 'foo')).to eq({})
  end

  context 'when an index is specified' do

    let(:url) do
      'foo/_rollover/bar'
    end

    it 'performs the request' do
      expect(client_double.indices.rollover(alias: 'foo', new_index: 'bar')).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/indices/rollover_spec.rb
elasticsearch-api-6.8.2 spec/elasticsearch/api/actions/indices/rollover_spec.rb
elasticsearch-api-7.6.0 spec/elasticsearch/api/actions/indices/rollover_spec.rb
elasticsearch-api-7.6.0.pre spec/elasticsearch/api/actions/indices/rollover_spec.rb
elasticsearch-api-7.5.0 spec/elasticsearch/api/actions/indices/rollover_spec.rb
elasticsearch-api-7.5.0.pre.pre spec/elasticsearch/api/actions/indices/rollover_spec.rb
elasticsearch-api-7.4.0 spec/elasticsearch/api/actions/indices/rollover_spec.rb
elasticsearch-api-7.3.0 spec/elasticsearch/api/actions/indices/rollover_spec.rb