diff --git a/features/steps/standby_cluster.py b/features/steps/standby_cluster.py index 063d9f82..c04fd6f3 100644 --- a/features/steps/standby_cluster.py +++ b/features/steps/standby_cluster.py @@ -10,7 +10,8 @@ SELECT * FROM pg_catalog.pg_stat_replication WHERE application_name = '{0}' """ -callback = sys.executable + " features/callback2.py " +executable = sys.executable if os.name != 'nt' else sys.executable.replace('\\', '/') +callback = executable + " features/callback2.py " @step('I start {name:w} with callback configured') @@ -18,7 +19,7 @@ def start_patroni_with_callbacks(context, name): return context.pctl.start(name, custom_config={ "postgresql": { "callbacks": { - "on_role_change": sys.executable + " features/callback.py" + "on_role_change": executable + " features/callback.py" } } }) @@ -31,7 +32,7 @@ def start_patroni(context, name, cluster_name): "postgresql": { "callbacks": {c: callback + name for c in ('on_start', 'on_stop', 'on_restart', 'on_role_change')}, "backup_restore": { - "command": (sys.executable + " features/backup_restore.py --sourcedir=" + + "command": (executable + " features/backup_restore.py --sourcedir=" + os.path.join(context.pctl.patroni_path, 'data', 'basebackup'))} } })