7676}
7777
7878# broken YAML tests on some releases
79- SKIP_TESTS = {
80- # Warning about date_histogram.interval deprecation is raised randomly
81- "search/aggregation/250_moving_fn[1]" ,
82- # body: null
83- "indices/simulate_index_template/10_basic[2]" ,
84- # No ML node with sufficient capacity / random ML failing
85- "ml/start_stop_datafeed" ,
86- "ml/post_data" ,
87- "ml/jobs_crud" ,
88- "ml/datafeeds_crud" ,
89- "ml/set_upgrade_mode" ,
90- "ml/reset_job[2]" ,
91- "ml/jobs_get_stats" ,
92- "ml/get_datafeed_stats" ,
93- "ml/get_trained_model_stats" ,
94- "ml/delete_job_force" ,
95- "ml/jobs_get_result_overall_buckets" ,
96- "ml/bucket_correlation_agg[0]" ,
97- "ml/job_groups" ,
98- "transform/transforms_stats_continuous[0]" ,
99- # Fails bad request instead of 404?
100- "ml/inference_crud" ,
101- # rollup/security_tests time out?
102- "rollup/security_tests" ,
103- # Our TLS certs are custom
104- "ssl/10_basic[0]" ,
105- # Our user is custom
106- "users/10_basic[3]" ,
107- # License warning not sent?
108- "license/30_enterprise_license[0]" ,
109- # Shards/snapshots aren't right?
110- "searchable_snapshots/10_usage[1]" ,
111- # flaky data streams?
112- "data_stream/10_basic[1]" ,
113- "data_stream/80_resolve_index_data_streams[1]" ,
114- # bad formatting?
115- "cat/allocation/10_basic" ,
116- "runtime_fields/10_keyword[8]" ,
117- # service account number not right?
118- "service_accounts/10_basic[1]" ,
119- # doesn't use 'contains' properly?
120- "xpack/10_basic[0]" ,
121- "privileges/40_get_user_privs[0]" ,
122- "privileges/40_get_user_privs[1]" ,
123- "features/get_features/10_basic[0]" ,
124- "features/reset_features/10_basic[0]" ,
125- # bad use of 'is_false'?
126- "indices/get_alias/10_basic[22]" ,
127- # unique usage of 'set'
128- "indices/stats/50_disk_usage[0]" ,
129- "indices/stats/60_field_usage[0]" ,
130- # actual Elasticsearch failure?
131- "transform/transforms_stats" ,
132- "transform/transforms_cat_apis" ,
133- "transform/transforms_update" ,
79+ FAILING_TESTS = {
80+ # TODO: bulk call in setup fails due to "malformed action/metadata line"
81+ # bulk body is being sent as a Buffer, unsure if related.
82+ "transform/10_basic" ,
83+ # TODO: wait_for_active_shards and rollover with conditions are not supported on serverless
84+ # see https://github.com/elastic/elasticsearch-clients-tests/issues/55
85+ "indices/rollover" ,
86+ # TODO: test runner needs to support ignoring 410 errors
87+ "indices/data_lifecycle" ,
88+ # TODO: test runner needs to support ignoring 410 errors
89+ "enrich/10_basic.yml" ,
90+ # TODO: parameter `enabled` is not allowed in source
91+ # Same underlying problem as https://github.com/elastic/elasticsearch-clients-tests/issues/55
92+ "cluster/component_templates" ,
93+ # TODO: expecting `ct_field` field mapping to be returned, but instead only finds `field`
94+ "indices/simulate_template" ,
13495}
13596
13697
@@ -609,8 +570,8 @@ def remove_implicit_resolver(cls, tag_to_remove):
609570 "teardown" : teardown_steps ,
610571 }
611572 # Skip either 'test_name' or 'test_name[x]'
612- if pytest_test_name in SKIP_TESTS or pytest_param_id in SKIP_TESTS :
613- pytest_param ["skip " ] = True
573+ if pytest_test_name in FAILING_TESTS or pytest_param_id in FAILING_TESTS :
574+ pytest_param ["fail " ] = True
614575
615576 YAML_TEST_SPECS .append (pytest .param (pytest_param , id = pytest_param_id ))
616577
@@ -630,7 +591,7 @@ def _pytest_param_sort_key(param: pytest.param) -> Tuple[Union[str, int], ...]:
630591
631592 @pytest .mark .parametrize ("test_spec" , YAML_TEST_SPECS )
632593 def test_rest_api_spec (test_spec , sync_runner ):
633- if test_spec .get ("skip " , False ):
634- pytest .skip ("Manually skipped in 'SKIP_TESTS'" )
594+ if test_spec .get ("fail " , False ):
595+ pytest .xfail ("Manually marked as failing in 'FAILING_TESTS'" , strict = True )
635596 sync_runner .use_spec (test_spec )
636597 sync_runner .run ()
0 commit comments