|
83 | 83 | end |
84 | 84 | end |
85 | 85 |
|
86 | | -SKIPPED_TESTS = [] |
87 | | - |
88 | | -# Respone from Elasticsearch includes the ca.crt, so length doesn't match. |
89 | | -SKIPPED_TESTS << { file: 'ssl/10_basic.yml', |
90 | | - description: 'Test get SSL certificates' } |
91 | | - |
92 | | -# ArgumentError for empty body |
93 | | -SKIPPED_TESTS << { file: 'watcher/put_watch/10_basic.yml', |
94 | | - description: 'Test empty body is rejected by put watch' } |
95 | | - |
96 | | -# The number of shards when a snapshot is successfully created is more than 1. Maybe because of the security index? |
97 | | -SKIPPED_TESTS << { file: 'snapshot/10_basic.yml', |
98 | | - description: 'Create a source only snapshot and then restore it' } |
99 | | - |
100 | | -# The test inserts an invalid license, which makes all subsequent tests fail. |
101 | | -SKIPPED_TESTS << { file: 'xpack/15_basic.yml', |
102 | | - description: '*' } |
103 | | - |
104 | | -# 'invalidated_tokens' is returning 5 in 'Test invalidate user's tokens' test. |
105 | | -SKIPPED_TESTS << { file: 'token/10_basic.yml', |
106 | | - description: "Test invalidate user's tokens" } |
107 | | - |
108 | | -SKIPPED_TESTS << { file: 'token/10_basic.yml', |
109 | | - description: "Test invalidate realm's tokens" } |
110 | | - |
111 | | -# Possible Docker issue. The IP from the response cannot be used to connect.HTTP input supports extracting of keys |
112 | | -SKIPPED_TESTS << { file: 'watcher/execute_watch/60_http_input.yml', |
113 | | - description: 'HTTP input supports extracting of keys' } |
114 | | - |
115 | | -# Searching the monitoring index returns no results. |
116 | | -SKIPPED_TESTS << { file: 'monitoring/bulk/10_basic.yml', |
117 | | - description: 'Bulk indexing of monitoring data on closed indices should throw an export exception' } |
118 | | - |
119 | | -# Searching the monitoring index returns no results. |
120 | | -SKIPPED_TESTS << { file: 'monitoring/bulk/20_privileges.yml', |
121 | | - description: 'Monitoring Bulk API' } |
122 | | - |
123 | | -# Operation times out "failed_node_exception" |
124 | | -SKIPPED_TESTS << { file: 'ml/set_upgrade_mode.yml', |
125 | | - description: 'Setting upgrade_mode to enabled' } |
126 | | - |
127 | | -# Operation times out "failed_node_exception" |
128 | | -SKIPPED_TESTS << { file: 'ml/set_upgrade_mode.yml', |
129 | | - description: 'Setting upgrade_mode to disabled' } |
130 | | - |
131 | | -# Operation times out "failed_node_exception" |
132 | | -SKIPPED_TESTS << { file: 'ml/set_upgrade_mode.yml', |
133 | | - description: 'Setting upgrade mode to disabled from enabled' } |
134 | | - |
135 | | -# Operation times out "failed_node_exception" |
136 | | -SKIPPED_TESTS << { file: 'ml/set_upgrade_mode.yml', |
137 | | - description: 'Attempt to open job when upgrade_mode is enabled' } |
138 | | - |
139 | | -# 'calendar3' in the field instead of 'calendar2' |
140 | | -SKIPPED_TESTS << { file: 'ml/calendar_crud.yml', |
141 | | - description: 'Test PageParams' } |
142 | | - |
143 | | -# Error about creating a job that already exists. |
144 | | -SKIPPED_TESTS << { file: 'ml/jobs_crud.yml', |
145 | | - description: 'Test close job with body params' } |
146 | | - |
147 | | -# Feature is currently experimental. |
148 | | -SKIPPED_TESTS << { file: 'ml/evaluate_data_frame.yml', |
149 | | - description: '*' } |
150 | | - |
151 | | -# Feature is currently experimental. |
152 | | -SKIPPED_TESTS << { file: 'ml/start_data_frame_analytics.yml', |
153 | | - description: '*' } |
154 | | - |
155 | | -# Feature is currently experimental. |
156 | | -SKIPPED_TESTS << { file: 'ml/stop_data_frame_analytics.yml', |
157 | | - description: '*' } |
158 | | - |
159 | | -# Feature is currently experimental. |
160 | | -SKIPPED_TESTS << { file: 'ml/data_frame_analytics_crud.yml', |
161 | | - description: '*' } |
162 | | - |
163 | | -# https://github.com/elastic/clients-team/issues/142 |
164 | | -SKIPPED_TESTS << { file: 'ml/forecast.yml', |
165 | | - description: 'Test forecast unknown job' } |
166 | | -SKIPPED_TESTS << { file: 'ml/post_data.yml', |
167 | | - description: 'Test POST data with invalid parameters' } |
168 | | -SKIPPED_TESTS << { file: 'ml/post_data.yml', |
169 | | - description: 'Test Flush data with invalid parameters' } |
170 | | - |
171 | | -# TODO: To be fixed with a release patch |
172 | | -SKIPPED_TESTS << { file: 'api_key/10_basic.yml', |
173 | | - description: 'Test get api key' } |
174 | | - |
175 | | -# TODO: Failing due to processing of regexp in test |
176 | | -SKIPPED_TESTS << { file: 'ml/explain_data_frame_analytics.yml', |
177 | | - description: 'Test non-empty data frame given body'} |
178 | | - |
179 | | -# Stats is not working in versions earlier than 8.0.0 |
180 | | -SKIPPED_TESTS << { file: 'analytics/usage.yml', |
181 | | - description: 'Usage stats on analytics indices'} |
182 | | - |
183 | | -# TODO https://github.com/elastic/elasticsearch-ruby/issues/853 |
184 | | -SKIPPED_TESTS << { file: 'ml/jobs_crud.yml', |
185 | | - description: 'Test put job with model_memory_limit as string and lazy open' } |
186 | | - |
187 | | -SKIPPED_TESTS << { file: 'ml/inference_crud.yml', |
188 | | - description: 'Test delete given unused trained model' } |
189 | | -SKIPPED_TESTS << { file: 'ml/filter_crud.yml', |
190 | | - description: '*' } |
| 86 | +# Skipped tests |
| 87 | +file = File.expand_path(__dir__ + '/skipped_tests.yml') |
| 88 | +skipped_tests = YAML.load_file(file) |
191 | 89 |
|
192 | 90 | # The directory of rest api YAML files. |
193 | | -REST_API_YAML_FILES = SINGLE_TEST || Dir.glob("#{YAML_FILES_DIRECTORY}/**/*.yml") |
| 91 | +REST_API_YAML_FILES = if ENV['RUN_SKIPPED_TESTS'] # only run the skipped tests if true |
| 92 | + SKIPPED_TESTS = [] |
| 93 | + skipped_tests.map { |test| "#{YAML_FILES_DIRECTORY}/#{test[:file]}" } |
| 94 | + else |
| 95 | + # If not, define the skipped tests constant and try the single test or all |
| 96 | + # the tests |
| 97 | + SKIPPED_TESTS = skipped_tests |
| 98 | + SINGLE_TEST || Dir.glob("#{YAML_FILES_DIRECTORY}/**/*.yml") |
| 99 | + end |
194 | 100 |
|
195 | 101 | # The features to skip |
196 | 102 | REST_API_YAML_SKIP_FEATURES = ['warnings', 'node_selector'].freeze |
0 commit comments