File tree Expand file tree Collapse file tree 6 files changed +14
-496
lines changed Expand file tree Collapse file tree 6 files changed +14
-496
lines changed Original file line number Diff line number Diff line change @@ -45,42 +45,9 @@ namespace :spec do
45
45
t . pattern = Dir . glob ( 'spec/**/*_spec.rb' )
46
46
end
47
47
48
- desc 'Download test suite to ./spec/tmp'
49
- task :download_tests do
50
- require 'open-uri'
51
- path = 'spec/tmp'
52
- filename = 'tests.zip'
53
- url = 'https://api.github.com/repos/elastic/elasticsearch-clients-tests/zipball/main'
54
-
55
- File . open ( filename , 'w' ) do |downloaded_file |
56
- URI . open (
57
- url ,
58
- 'Accept' => 'application/vnd.github+json'
59
- ) do |artifact_file |
60
- downloaded_file . write ( artifact_file . read )
61
- end
62
- end
63
- if File . exist? ( filename )
64
- puts "Successfully downloaded #{ filename } "
65
- else
66
- warn "[!] Couldn't download #{ filename } "
67
- exit 1
68
- end
69
-
70
- puts "Unzipping files"
71
- `unzip #{ filename } -d spec/tmp/`
72
- puts "Removing zip file"
73
- File . delete ( filename )
74
- end
75
-
76
- desc 'Clean tests folder'
77
- task :clean_tests do
78
- FileUtils . rm_rf ( Dir . glob ( './spec/tmp/**/*' ) , secure : true )
79
- end
80
-
81
48
desc 'Run YAML test runner'
82
49
task :yaml do
83
- ruby './spec/yaml-test-runner/runner .rb'
50
+ ruby './spec/yaml-test-runner/run .rb'
84
51
end
85
52
end
86
53
@@ -112,7 +79,7 @@ rescue StandardError => e
112
79
abort "[!!!] #{ e . class } : #{ e . message } "
113
80
end
114
81
115
- desc " Server info"
82
+ desc ' Server info'
116
83
task :info do
117
84
require 'elasticsearch-serverless'
118
85
client = ElasticsearchServerless ::Client . new ( url : ENV [ 'ELASTICSEARCH_URL' ] , api_key : ENV [ 'API_KEY' ] )
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 15
15
# specific language governing permissions and limitations
16
16
# under the License.
17
17
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
You can’t perform that action at this time.
0 commit comments