File tree Expand file tree Collapse file tree 2 files changed +9
-17
lines changed
Expand file tree Collapse file tree 2 files changed +9
-17
lines changed Original file line number Diff line number Diff line change 123123SKIPPED_TESTS << { file : 'deprecation/10_basic.yml' ,
124124 description : 'Test Deprecations' }
125125
126-
127- # TODO
128- SKIPPED_TESTS << { file : 'ml/forecast.yml' ,
129- description : 'Test forecast unknown job' }
130- # TODO
131- SKIPPED_TESTS << { file : 'ml/post_data.yml' ,
132- description : 'Test POST data with invalid parameters' }
133- # TODO
134- SKIPPED_TESTS << { file : 'ml/post_data.yml' ,
135- description : 'Test Flush data with invalid parameters' }
136-
126+ # The directory of rest api YAML files.
137127REST_API_YAML_FILES = SINGLE_TEST || Dir . glob ( "#{ YAML_FILES_DIRECTORY } /**/*.yml" )
128+
129+ # The features to skip
138130REST_API_YAML_SKIP_FEATURES = [ 'warnings' ] . freeze
139131
140132
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ def skip_test?(client, features_to_skip = test_file.features_to_skip)
152152 if @skip
153153 @skip . collect { |s | s [ 'skip' ] } . any? do |skip |
154154 contains_features_to_skip? ( features_to_skip , skip ) ||
155- ! version_requirement_met ?( client , skip )
155+ skip_version ?( client , skip )
156156 end
157157 end
158158 end
@@ -169,20 +169,20 @@ def pre_defined_skip?
169169 end
170170 end
171171
172- def version_requirement_met ?( client , skip_definition )
173- return false if skip_definition [ 'version' ] == 'all'
172+ def skip_version ?( client , skip_definition )
173+ return true if skip_definition [ 'version' ] == 'all'
174174 range_partition = /\s *-\s */
175175 if versions = skip_definition [ 'version' ] && skip_definition [ 'version' ] . partition ( range_partition )
176176 low = versions [ 0 ]
177177 high = versions [ 2 ] unless versions [ 2 ] == ''
178178 range = low ..high
179179 begin
180- client_version = client . info [ 'version' ] [ 'number' ]
180+ server_version = client . info [ 'version' ] [ 'number' ]
181181 rescue
182182 warn ( 'Could not determine Elasticsearch version when checking if test should be skipped.' )
183183 end
184- range . cover? ( client_version )
185- end || true
184+ range . cover? ( server_version )
185+ end
186186 end
187187
188188 def is_a_validation? ( action )
You can’t perform that action at this time.
0 commit comments