1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-11-24 08:52:38 +02:00

tests: support new behaviour of node.cleanup() in testgres

This commit is contained in:
Grigory Smolkin 2018-12-27 13:00:57 +03:00
parent b61df02ce1
commit 361d408c19

View File

@ -5,6 +5,7 @@ import subprocess
from datetime import datetime
import sys
import time
import shutil
module_name = 'restore'
@ -840,7 +841,7 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
repr(e.message), self.cmd))
# 2 - Try to restore to existing tablespace directory
node.cleanup()
shutil.rmtree(node.data_dir, ignore_errors=True)
try:
self.restore_node(backup_dir, 'node', node)
# we should die here because exception is what we expect to happen