Skip to content

Commit a3a098e

Browse files
committed
[Test Runner] Skips migrate.reindex tests
1 parent f389b6a commit a3a098e

File tree

5 files changed

+198
-0
lines changed

5 files changed

+198
-0
lines changed

elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,10 @@
226226
-
227227
:file: 'esql/150_lookup.yml'
228228
:description: '*'
229+
# TODO: once migrate is available in spec
230+
-
231+
:file: 'migrate/10_reindex.yml'
232+
:description: '*'
233+
-
234+
:file: 'migrate/20_reindex_status.yml'
235+
:description: '*'
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 'async_search.delete' do
21+
let(:expected_args) do
22+
[
23+
'DELETE',
24+
'_async_search/foo',
25+
{},
26+
nil,
27+
{},
28+
{ endpoint: 'count' }
29+
]
30+
end
31+
32+
it 'performs the request' do
33+
expect(client_double.async_search.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 'async_search.delete' do
21+
let(:expected_args) do
22+
[
23+
'GET',
24+
'_async_search/foo',
25+
{},
26+
nil,
27+
{},
28+
{ endpoint: 'count' }
29+
]
30+
end
31+
32+
it 'performs the request' do
33+
expect(client_double.async_search.get(id: 'foo')).to be_a Elasticsearch::API::Response
34+
end
35+
end
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
require 'spec_helper'
18+
19+
describe 'async_search.delete' do
20+
let(:expected_args) do
21+
[
22+
'GET',
23+
'_async_search/status/foo',
24+
{},
25+
nil,
26+
{},
27+
{ endpoint: 'async_search.status' }
28+
]
29+
end
30+
31+
it 'performs the request' do
32+
expect(client_double.async_search.status(id: 'foo')).to be_a Elasticsearch::API::Response
33+
end
34+
end
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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+
require 'spec_helper'
18+
19+
describe 'async_search.submit' do
20+
context 'with no parameters' do
21+
let(:expected_args) do
22+
[
23+
'POST',
24+
'_async_search',
25+
{},
26+
nil,
27+
{},
28+
{ endpoint: 'async_search.submit' }
29+
]
30+
end
31+
32+
it 'performs the request' do
33+
expect(client_double.async_search.submit).to be_a Elasticsearch::API::Response
34+
end
35+
end
36+
37+
context 'with index' do
38+
let(:expected_args) do
39+
[
40+
'DELETE',
41+
'_async_search/foo',
42+
{},
43+
nil,
44+
{},
45+
{ endpoint: 'count' }
46+
]
47+
end
48+
49+
it 'performs the request' do
50+
expect(client_double.async_search.submit).to be_a Elasticsearch::API::Response
51+
end
52+
end
53+
end
54+
55+
require 'test_helper'
56+
57+
module Elasticsearch
58+
module Test
59+
class XPackAsyncSearchSubmit < Minitest::Test
60+
subject { FakeClient.new }
61+
62+
context 'XPack: Async Search Submit' do
63+
should 'perform correct request' do
64+
subject.expects(:perform_request).with do |method, url, params, body|
65+
assert_equal('POST', method)
66+
assert_equal('_async_search', url)
67+
assert_equal({}, params)
68+
assert_nil(body)
69+
end.returns(FakeResponse.new)
70+
71+
subject.async_search.submit
72+
end
73+
74+
should 'perform correct request with index' do
75+
subject.expects(:perform_request).with do |method, url, params, body|
76+
assert_equal('POST', method)
77+
assert_equal('foo/_async_search', url)
78+
assert_equal({}, params)
79+
assert_nil(body)
80+
end.returns(FakeResponse.new)
81+
82+
subject.async_search.submit(index: 'foo')
83+
end
84+
end
85+
end
86+
end
87+
end

0 commit comments

Comments
 (0)