Skip to content

Commit d5b2bb6

Browse files
committed
Replaces yaml test runner with gem
1 parent 80f7d10 commit d5b2bb6

File tree

6 files changed

+14
-463
lines changed

6 files changed

+14
-463
lines changed

Rakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ namespace :spec do
8080

8181
desc 'Run YAML test runner'
8282
task :yaml do
83-
ruby './spec/yaml-test-runner/runner.rb'
83+
ruby './spec/yaml-test-runner/run.rb'
8484
end
8585
end
8686

@@ -112,7 +112,7 @@ rescue StandardError => e
112112
abort "[!!!] #{e.class} : #{e.message}"
113113
end
114114

115-
desc "Server info"
115+
desc 'Server info'
116116
task :info do
117117
require 'elasticsearch-serverless'
118118
client = ElasticsearchServerless::Client.new(url: ENV['ELASTICSEARCH_URL'], api_key: ENV['API_KEY'])

spec/yaml-test-runner/code_runner.rb

Lines changed: 0 additions & 223 deletions
This file was deleted.

spec/yaml-test-runner/printer.rb

Lines changed: 0 additions & 69 deletions
This file was deleted.

spec/yaml-test-runner/errors.rb renamed to spec/yaml-test-runner/run.rb

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,15 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
module Elastic
19-
module TestRunner
20-
class TestFailure < StandardError; end
21-
class TestError < StandardError; end
22-
end
23-
end
18+
require 'logger'
19+
require 'elasticsearch/tests/test_runner'
20+
require 'elasticsearch/tests/downloader'
21+
require_relative '../spec_helper'
22+
23+
tests_path = File.expand_path('../../tmp', __dir__)
24+
25+
logger = Logger.new($stdout)
26+
logger.level = Logger::WARN unless ENV['DEBUG']
27+
28+
Elasticsearch::Tests::Downloader::run(tests_path)
29+
Elasticsearch::Tests::TestRunner.new(CLIENT, tests_path, logger).run

0 commit comments

Comments
 (0)