Automatically skip some behave tests on legacy Postgres (#2358)

previously behave had to be started with `--tags=-skip` argument.
This commit is contained in:
Alexander Kukushkin
2022-07-13 12:13:36 +02:00
committed by GitHub
parent 5b1fd23776
commit 4c5cce5efd
3 changed files with 11 additions and 4 deletions
+8
View File
@@ -903,3 +903,11 @@ def after_feature(context, feature):
context.dcs_ctl.cleanup_service_tree()
if feature.status == 'failed':
shutil.copytree(context.pctl.output_dir, context.pctl.output_dir + '_failed')
def before_scenario(context, scenario):
if 'slot-advance' in scenario.effective_tags:
for p in context.pctl._processes.values():
if p._conn and p._conn.server_version < 110000:
scenario.skip('pg_replication_slot_advance() is not supported on {0}'.format(p._conn.server_version))
break