Skip to content

Commit 92de03c

Browse files
committed
[CI] Updates tasks
1 parent 681e517 commit 92de03c

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

.ci/run-repository.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ else
6363
--name elasticsearch-ruby \
6464
--rm \
6565
elastic/elasticsearch-ruby \
66-
bundle exec rake test:download_artifacts test:security
66+
bundle exec rake test:download_artifacts test:rest_api
6767
fi

elasticsearch-api/api-spec-testing/test_file.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,10 @@ def clear_auto_follow_patterns(client)
328328
private
329329

330330
def create_x_pack_rest_user(client)
331-
client.security.put_user(username: 'x_pack_rest_user',
332-
body: { password: 'x-pack-test-password', roles: ['superuser'] })
331+
client.security.put_user(
332+
username: 'x_pack_rest_user',
333+
body: { password: 'x-pack-test-password', roles: ['superuser'] }
334+
)
333335
end
334336

335337
def clear_roles(client)

elasticsearch-api/spec/elasticsearch/api/rest_api_yaml_spec.rb

+2-9
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,8 @@
4747
next
4848
end
4949

50-
let(:client) do
51-
DEFAULT_CLIENT
52-
end
53-
54-
# Runs once before each test in a test file
55-
before(:all) do
56-
test_file.setup
57-
end
58-
50+
let(:client) { DEFAULT_CLIENT }
51+
before(:all) { test_file.setup }
5952
after(:all) do
6053
test_file.teardown
6154
Elasticsearch::RestAPIYAMLTests::TestFile.wipe_cluster(ADMIN_CLIENT)

rake_tasks/test_tasks.rake

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ namespace :test do
5353
desc 'Run rest api tests'
5454
task rest_api: ['elasticsearch:wait_for_green'] do
5555
puts '-' * 80
56-
sh "cd #{CURRENT_PATH.join('elasticsearch-api')} && unset BUNDLE_GEMFILE && bundle exec rake test:rest_api[true]"
56+
sh "cd #{CURRENT_PATH.join('elasticsearch-api')} && unset BUNDLE_GEMFILE && bundle exec rake test:rest_api"
5757
puts "\n"
5858
end
5959

6060
desc 'Run security (Platinum) rest api yaml tests'
6161
task security: 'elasticsearch:wait_for_green' do
6262
puts '-' * 80
63-
sh "cd #{CURRENT_PATH.join('elasticsearch-api')} && unset BUNDLE_GEMFILE && bundle exec rake test:platinum_api"
63+
sh "cd #{CURRENT_PATH.join('elasticsearch-api')} && unset BUNDLE_GEMFILE && TEST_SUITE=platinum bundle exec rake test:rest_api"
6464
puts "\n"
6565
end
6666

0 commit comments

Comments
 (0)