Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes duplicated task to download test files #109

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildkite/run-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ docker run \
--name elasticsearch-ruby \
--rm \
elastic/elasticsearch-ruby \
bundle exec rake info spec:otel spec:api spec:stack spec:download_tests spec:yaml
bundle exec rake info spec:otel spec:api spec:stack spec:yaml
28 changes: 0 additions & 28 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,34 +53,6 @@ namespace :spec do
t.pattern = Dir.glob('spec/**/*_spec.rb')
end

desc 'Download test suite to ./spec/tmp'
task :download_tests do
require 'open-uri'
path = 'spec/tmp'
filename = 'tests.zip'
url = 'https://api.github.com/repos/elastic/elasticsearch-clients-tests/zipball/main'

File.open(filename, 'w') do |downloaded_file|
URI.open(
url,
'Accept' => 'application/vnd.github+json'
) do |artifact_file|
downloaded_file.write(artifact_file.read)
end
end
if File.exist?(filename)
puts "Successfully downloaded #{filename}"
else
warn "[!] Couldn't download #{filename}"
exit 1
end

puts "Unzipping files"
`unzip #{filename} -d spec/tmp/`
puts "Removing zip file"
File.delete(filename)
end

desc 'Clean tests folder'
task :clean_tests do
FileUtils.rm_rf(Dir.glob('./spec/tmp/**/*'), secure: true)
Expand Down
Loading