Skip to content

Commit e62c191

Browse files
committed
Update remaining node specs
1 parent a8eb0d9 commit e62c191

File tree

2 files changed

+70
-2
lines changed

2 files changed

+70
-2
lines changed

elasticsearch-api/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
url,
2626
params,
2727
body,
28-
{}
28+
{},
29+
{ endpoint: 'nodes.reload_secure_settings' }
2930
]
3031
end
3132

@@ -43,6 +44,17 @@
4344
'_nodes/foo/reload_secure_settings'
4445
end
4546

47+
let(:expected_args) do
48+
[
49+
'POST',
50+
url,
51+
params,
52+
body,
53+
{},
54+
{ defined_params: { node_id: 'foo' }, endpoint: 'nodes.reload_secure_settings' }
55+
]
56+
end
57+
4658
it 'performs the request' do
4759
expect(client_double.nodes.reload_secure_settings(node_id: 'foo')).to be_a Elasticsearch::API::Response
4860
end
@@ -55,6 +67,17 @@
5567
'_nodes/foo,bar/reload_secure_settings'
5668
end
5769

70+
let(:expected_args) do
71+
[
72+
'POST',
73+
url,
74+
params,
75+
body,
76+
{},
77+
{ defined_params: { node_id: 'foo,bar' }, endpoint: 'nodes.reload_secure_settings' }
78+
]
79+
end
80+
5881
it 'performs the request' do
5982
expect(client_double.nodes.reload_secure_settings(node_id: 'foo,bar', body: { foo: 'bar' })).to be_a Elasticsearch::API::Response
6083
end
@@ -66,6 +89,17 @@
6689
'_nodes/foo,bar/reload_secure_settings'
6790
end
6891

92+
let(:expected_args) do
93+
[
94+
'POST',
95+
url,
96+
params,
97+
body,
98+
{},
99+
{ defined_params: { node_id: ['foo', 'bar'] }, endpoint: 'nodes.reload_secure_settings' }
100+
]
101+
end
102+
69103
it 'performs the request' do
70104
expect(client_double.nodes.reload_secure_settings(node_id: ['foo', 'bar'], body: { foo: 'bar' })).to be_a Elasticsearch::API::Response
71105
end

elasticsearch-api/spec/elasticsearch/api/actions/nodes/stats_spec.rb

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
url,
2626
params,
2727
nil,
28-
{}
28+
{},
29+
{ endpoint: 'nodes.stats' }
2930
]
3031
end
3132

@@ -47,6 +48,17 @@
4748
'_nodes/foo/stats'
4849
end
4950

51+
let(:expected_args) do
52+
[
53+
'GET',
54+
url,
55+
params,
56+
nil,
57+
{},
58+
{ defined_params: { node_id: 'foo' }, endpoint: 'nodes.stats' }
59+
]
60+
end
61+
5062
it 'performs the request' do
5163
expect(client_double.nodes.stats(node_id: 'foo')).to be_a Elasticsearch::API::Response
5264
end
@@ -58,6 +70,17 @@
5870
'_nodes/stats/http,fs'
5971
end
6072

73+
let(:expected_args) do
74+
[
75+
'GET',
76+
url,
77+
params,
78+
nil,
79+
{},
80+
{ defined_params: { metric: [:http, :fs] }, endpoint: 'nodes.stats' }
81+
]
82+
end
83+
6184
it 'performs the request' do
6285
expect(client_double.nodes.stats(metric: [:http, :fs])).to be_a Elasticsearch::API::Response
6386
end
@@ -69,6 +92,17 @@
6992
'_nodes/stats/indices/filter_cache'
7093
end
7194

95+
let(:expected_args) do
96+
[
97+
'GET',
98+
url,
99+
params,
100+
nil,
101+
{},
102+
{ defined_params: { metric: :indices, index_metric: :filter_cache }, endpoint: 'nodes.stats' }
103+
]
104+
end
105+
72106
it 'performs the request' do
73107
expect(client_double.nodes.stats(metric: :indices, index_metric: :filter_cache)).to be_a Elasticsearch::API::Response
74108
end

0 commit comments

Comments
 (0)