def before_scenario(context, scenario): if "skip" in scenario.effective_tags: scenario.skip("skipping scenario tagged with @skip") return if 'gpmovemirrors' in context.feature.tags: context.mirror_context = MirrorMgmtContext() if 'gpconfig' in context.feature.tags: context.gpconfig_context = GpConfigContext() if 'gpssh-exkeys' in context.feature.tags: context.gpssh_exkeys_context = GpsshExkeysMgmtContext(context) tags_to_skip = [ 'gpexpand', 'gpaddmirrors', 'gpstate', 'gpmovemirrors', 'gpconfig', 'gpssh-exkeys', 'gpstop', 'gpinitsystem', 'cross_subnet' ] if set(context.feature.tags).intersection(tags_to_skip): return if 'analyzedb' not in context.feature.tags: start_database_if_not_started(context) drop_database_if_exists(context, 'testdb')