@@ -213,11 +213,13 @@ def test_restore_from_fullbackup_to_new_location(self):
213
213
self .node .cleanup ()
214
214
shutil .rmtree (self .get_tblspace_path (self .node , tblspace_name ))
215
215
216
- self . node_new = self .make_simple_node (base_dir = "{0}/{1}/node_new_location" .format (module_name , self .fname ))
217
- self . node_new .cleanup ()
216
+ node_new = self .make_simple_node (base_dir = "{0}/{1}/node_new_location" .format (module_name , self .fname ))
217
+ node_new .cleanup ()
218
218
219
219
try :
220
- self .restore_node (self .backup_dir , 'node' , self .node_new , backup_id = self .backup_id )
220
+ self .restore_node (self .backup_dir , 'node' , node_new , backup_id = self .backup_id )
221
+ node_new .append_conf ("postgresql.auto.conf" ,
222
+ "port = {0}" .format (node_new .port ))
221
223
except ProbackupException as e :
222
224
self .fail (
223
225
"ERROR: Restore from full backup failed. \n {0} \n {1}" .format (
@@ -230,7 +232,7 @@ def test_restore_from_fullbackup_to_new_location(self):
230
232
"ERROR: File pg_compression not found in backup dir"
231
233
)
232
234
try :
233
- self . node_new .slow_start ()
235
+ node_new .slow_start ()
234
236
except ProbackupException as e :
235
237
self .fail (
236
238
"ERROR: Instance not started after restore. \n {0} \n {1}" .format (
@@ -240,10 +242,10 @@ def test_restore_from_fullbackup_to_new_location(self):
240
242
)
241
243
242
244
self .assertEqual (
243
- repr (self . node .safe_psql ("postgres" , "SELECT * FROM %s" % 't1' )),
245
+ repr (node_new .safe_psql ("postgres" , "SELECT * FROM %s" % 't1' )),
244
246
repr (self .table_t1 )
245
247
)
246
- self . node_new .cleanup ()
248
+ node_new .cleanup ()
247
249
248
250
# @unittest.expectedFailure
249
251
# @unittest.skip("skip")
@@ -255,11 +257,13 @@ def test_restore_from_fullbackup_to_new_location_5_jobs(self):
255
257
self .node .cleanup ()
256
258
shutil .rmtree (self .get_tblspace_path (self .node , tblspace_name ))
257
259
258
- self . node_new = self .make_simple_node (base_dir = "{0}/{1}/node_new_location" .format (module_name , self .fname ))
259
- self . node_new .cleanup ()
260
+ node_new = self .make_simple_node (base_dir = "{0}/{1}/node_new_location" .format (module_name , self .fname ))
261
+ node_new .cleanup ()
260
262
261
263
try :
262
- self .restore_node (self .backup_dir , 'node' , self .node_new , backup_id = self .backup_id , options = ['-j' , '5' ])
264
+ self .restore_node (self .backup_dir , 'node' , node_new , backup_id = self .backup_id , options = ['-j' , '5' ])
265
+ node_new .append_conf ("postgresql.auto.conf" ,
266
+ "port = {0}" .format (node_new .port ))
263
267
except ProbackupException as e :
264
268
self .fail (
265
269
"ERROR: Restore from full backup failed. \n {0} \n {1}" .format (
@@ -272,7 +276,7 @@ def test_restore_from_fullbackup_to_new_location_5_jobs(self):
272
276
"ERROR: File pg_compression not found in backup dir"
273
277
)
274
278
try :
275
- self . node_new .slow_start ()
279
+ node_new .slow_start ()
276
280
except ProbackupException as e :
277
281
self .fail (
278
282
"ERROR: Instance not started after restore. \n {0} \n {1}" .format (
@@ -282,10 +286,10 @@ def test_restore_from_fullbackup_to_new_location_5_jobs(self):
282
286
)
283
287
284
288
self .assertEqual (
285
- repr (self . node .safe_psql ("postgres" , "SELECT * FROM %s" % 't1' )),
289
+ repr (node_new .safe_psql ("postgres" , "SELECT * FROM %s" % 't1' )),
286
290
repr (self .table_t1 )
287
291
)
288
- self . node_new .cleanup ()
292
+ node_new .cleanup ()
289
293
290
294
# @unittest.expectedFailure
291
295
# @unittest.skip("skip")
0 commit comments