Skip to content

Commit 85e17d2

Browse files
committed
Migrates enrich tests to RSpec
Migrates eql tests to rspec Migrates graph tests to RSpec Migrates more ilm tests to RSpec Migrates more indices tests to RSpec Migrates knn_search test to RSpec Migrates license tests to RSpec Migrates logstash tests to RSpec Migrates ML test to RSpec Migrates migration deprecations test to RSpec Migrates info tests to RSpec Migrates rollup tests to RSpec Migrates ssl tests to RSpec Migrates transform tests to RSpec Migrates usage tests to RSpec
1 parent b116e61 commit 85e17d2

39 files changed

+1365
-7
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Licensed to Elasticsearch B.V. under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch B.V. licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
require 'spec_helper'
19+
20+
describe 'client#enrich.delete_policy' do
21+
let(:expected_args) do
22+
[
23+
'DELETE',
24+
'_enrich/policy/foo',
25+
{},
26+
nil,
27+
{},
28+
{ defined_params: { name: 'foo' }, endpoint: 'enrich.delete_policy' }
29+
]
30+
end
31+
32+
it 'performs the request' do
33+
expect(client_double.enrich.delete_policy(name: 'foo')).to be_a Elasticsearch::API::Response
34+
end
35+
end
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Licensed to Elasticsearch B.V. under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch B.V. licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
require 'spec_helper'
19+
20+
describe 'client#enrich.delete_policy' do
21+
let(:expected_args) do
22+
[
23+
'PUT',
24+
'_enrich/policy/foo/_execute',
25+
{},
26+
nil,
27+
{},
28+
{ defined_params: { name: 'foo' }, endpoint: 'enrich.execute_policy' }
29+
]
30+
end
31+
32+
it 'performs the request' do
33+
expect(client_double.enrich.execute_policy(name: 'foo')).to be_a Elasticsearch::API::Response
34+
end
35+
end
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Licensed to Elasticsearch B.V. under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch B.V. licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
require 'spec_helper'
19+
20+
describe 'client#enrich.delete_policy' do
21+
let(:expected_args) do
22+
[
23+
'GET',
24+
'_enrich/policy/foo',
25+
{},
26+
nil,
27+
{},
28+
{ defined_params: { name: 'foo' }, endpoint: 'enrich.get_policy' }
29+
]
30+
end
31+
32+
it 'performs the request' do
33+
expect(client_double.enrich.get_policy(name: 'foo')).to be_a Elasticsearch::API::Response
34+
end
35+
end
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Licensed to Elasticsearch B.V. under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch B.V. licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
require 'spec_helper'
19+
20+
describe 'client#enrich.delete_policy' do
21+
let(:expected_args) do
22+
[
23+
'PUT',
24+
'_enrich/policy/foo',
25+
{},
26+
{},
27+
{},
28+
{ defined_params: { name: 'foo' }, endpoint: 'enrich.put_policy' }
29+
]
30+
end
31+
32+
it 'performs the request' do
33+
expect(client_double.enrich.put_policy(body: {}, name: 'foo')).to be_a Elasticsearch::API::Response
34+
end
35+
end
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Licensed to Elasticsearch B.V. under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch B.V. licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
require 'spec_helper'
19+
20+
describe 'client#enrich.delete_policy' do
21+
let(:expected_args) do
22+
[
23+
'GET',
24+
'_enrich/_stats',
25+
{},
26+
nil,
27+
{},
28+
{ endpoint: 'enrich.stats' }
29+
]
30+
end
31+
32+
it 'performs the request' do
33+
expect(client_double.enrich.stats).to be_a Elasticsearch::API::Response
34+
end
35+
end
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Licensed to Elasticsearch B.V. under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch B.V. licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
require 'spec_helper'
19+
20+
describe 'client#eql.search' do
21+
let(:expected_args) do
22+
[
23+
'DELETE',
24+
'_eql/search/foo',
25+
{},
26+
nil,
27+
{},
28+
{ defined_params: { id: 'foo' }, endpoint: 'eql.delete' }
29+
]
30+
end
31+
32+
it 'performs the request' do
33+
expect(client_double.eql.delete(id: 'foo')).to be_a Elasticsearch::API::Response
34+
end
35+
end
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Licensed to Elasticsearch B.V. under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch B.V. licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
require 'spec_helper'
19+
20+
describe 'client#eql.search' do
21+
let(:expected_args) do
22+
[
23+
'GET',
24+
'_eql/search/foo',
25+
{},
26+
nil,
27+
{},
28+
{ defined_params: { id: 'foo' }, endpoint: 'eql.get' }
29+
]
30+
end
31+
32+
it 'performs the request' do
33+
expect(client_double.eql.get(id: 'foo')).to be_a Elasticsearch::API::Response
34+
end
35+
end
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Licensed to Elasticsearch B.V. under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch B.V. licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
require 'spec_helper'
19+
20+
describe 'client#eql.search' do
21+
let(:expected_args) do
22+
[
23+
'GET',
24+
'_eql/search/status/foo',
25+
{},
26+
nil,
27+
{},
28+
{ defined_params: { id: 'foo' }, endpoint: 'eql.get_status' }
29+
]
30+
end
31+
32+
it 'performs the request' do
33+
expect(client_double.eql.get_status(id: 'foo')).to be_a Elasticsearch::API::Response
34+
end
35+
end
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Licensed to Elasticsearch B.V. under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch B.V. licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
require 'spec_helper'
19+
20+
describe 'client#eql.search' do
21+
let(:expected_args) do
22+
[
23+
'POST',
24+
'foo/_eql/search',
25+
{},
26+
{},
27+
{},
28+
{ defined_params: { index: 'foo' }, endpoint: 'eql.search' }
29+
]
30+
end
31+
32+
it 'performs the request' do
33+
expect(client_double.eql.search(index: 'foo', body: {})).to be_a Elasticsearch::API::Response
34+
end
35+
end
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Licensed to Elasticsearch B.V. under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch B.V. licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
require 'spec_helper'
19+
20+
describe 'client#eql.search' do
21+
let(:expected_args) do
22+
[
23+
'GET',
24+
'foo/_graph/explore',
25+
{},
26+
nil,
27+
{},
28+
{ defined_params: { index: 'foo' }, endpoint: 'graph.explore' }
29+
]
30+
end
31+
32+
it 'performs the request' do
33+
expect(client_double.graph.explore(index: 'foo')).to be_a Elasticsearch::API::Response
34+
end
35+
end

0 commit comments

Comments
 (0)