Sha256: 4105903e794d1b0328a5d5fe3974faa474552535fc2ee5e58faa03c469e5478e

Contents?: true

Size: 1.62 KB

Versions: 8

Compression:

Stored size: 1.62 KB

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#reload_secure_settings' do

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

  let(:params) do
    {}
  end

  let(:url) do
    '_nodes/reload_secure_settings'
  end

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

  context 'when a node id is specified' do

    let(:url) do
      '_nodes/foo/reload_secure_settings'
    end

    it 'performs the request' do
      expect(client_double.nodes.reload_secure_settings(node_id: 'foo')).to eq({})
    end
  end

  context 'when more than one node id is specified as a string' do

    let(:url) do
      '_nodes/foo,bar/reload_secure_settings'
    end

    it 'performs the request' do
      expect(client_double.nodes.reload_secure_settings(node_id: 'foo,bar', body: { foo: 'bar' })).to eq({})
    end
  end

  context 'when more than one node id is specified as a list' do

    let(:url) do
      '_nodes/foo,bar/reload_secure_settings'
    end

    it 'performs the request' do
      expect(client_double.nodes.reload_secure_settings(node_id: ['foo', 'bar'], body: { foo: 'bar' })).to eq({})
    end
  end

  context 'when a timeout param is specified' do

    let(:params) do
      { timeout: '30s'}
    end

    it 'performs the request' do
      expect(client_double.nodes.reload_secure_settings(timeout: '30s')).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/nodes/reload_secure_settings_spec.rb
elasticsearch-api-6.8.2 spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb
elasticsearch-api-7.6.0 spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb
elasticsearch-api-7.6.0.pre spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb
elasticsearch-api-7.5.0 spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb
elasticsearch-api-7.5.0.pre.pre spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb
elasticsearch-api-7.4.0 spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb
elasticsearch-api-7.3.0 spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb