File tree Expand file tree Collapse file tree 2 files changed +3
-29
lines changed
Expand file tree Collapse file tree 2 files changed +3
-29
lines changed Original file line number Diff line number Diff line change @@ -787,13 +787,6 @@ def set_archiving(
787787 log_level = False , archive_timeout = False ,
788788 custom_archive_command = None ):
789789
790- # check instance existing
791- instances_json = self .show (instance = None , as_json = True , expect_error = False , as_text = True )
792- instances_data = json .loads (instances_json )
793- if not any (inst_data .get ('instance' ) == instance for inst_data in instances_data ):
794- raise RuntimeError ("Instance '{0}' does not exist. " \
795- "Please add the instance first using add_instance() or init_pb_node()." .format (instance ))
796-
797790 # parse postgresql.auto.conf
798791 options = {}
799792 if replica :
Original file line number Diff line number Diff line change 55import pytest
66
77import testgres
8- from pg_probackup2 .app import ProbackupApp
9- from pg_probackup2 .init_helpers import Init , init_params
10- from pg_probackup2 .storage .fs_backup import FSTestBackupDir
8+ from ... pg_probackup2 .app import ProbackupApp
9+ from ... pg_probackup2 .init_helpers import Init , init_params
10+ from . .storage .fs_backup import FSTestBackupDir
1111
1212
1313class ProbackupTest :
@@ -102,22 +102,3 @@ def test_full_backup(self):
102102
103103 # Check if the backup is valid
104104 assert f"INFO: Backup { backup_id } is valid" in out
105-
106- def test_set_archiving_nonexistent_instance (self ):
107- self .pb .init ()
108-
109- with pytest .raises (AssertionError ) as exc_info :
110- self .pb .set_archiving ('nonexistent_instance' , None )
111-
112- assert "Instance 'nonexistent_instance' does not exist" in str (exc_info .value )
113-
114- def test_set_archiving_existing_instance (self ):
115- node = self .pg_node .make_simple ('node' , pg_options = {"fsync" : "off" , "synchronous_commit" : "off" })
116-
117- with node :
118- self .pb .init ()
119- node .slow_start ()
120- self .pb .add_instance ('node' , node )
121- self .pb .set_archiving ('node' , node )
122-
123- assert "does not exist" not in str (self .pb .test_class .output or "" )
You can’t perform that action at this time.
0 commit comments