From c6c6d22a387753bde48edf132e772a58365bf1df Mon Sep 17 00:00:00 2001 From: "z.kasymalieva" Date: Thu, 25 Jan 2024 17:02:45 +0300 Subject: [PATCH] Fix del_instance function to receive options from tests --- .../plugins/pg_probackup2/pg_probackup2/app.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/testgres/plugins/pg_probackup2/pg_probackup2/app.py b/testgres/plugins/pg_probackup2/pg_probackup2/app.py index 2c31de51..c5393550 100644 --- a/testgres/plugins/pg_probackup2/pg_probackup2/app.py +++ b/testgres/plugins/pg_probackup2/pg_probackup2/app.py @@ -189,15 +189,13 @@ def set_backup(self, instance, backup_id=False, return self.run(cmd + options, old_binary=old_binary, expect_error=expect_error) - def del_instance(self, instance, old_binary=False, expect_error=False): - - return self.run([ - 'del-instance', - '--instance={0}'.format(instance), - ], - old_binary=old_binary, - expect_error=expect_error - ) + def del_instance(self, instance, options=None, old_binary=False, expect_error=False): + if options is None: + options = [] + cmd = ['del-instance', '--instance={0}'.format(instance)] + options + return self.run(cmd, + old_binary=old_binary, + expect_error=expect_error) def backup_node( self, instance, node, data_dir=False,