Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit94fd54a

Browse files
committed
Fix test pgpro560.CheckSystemID.test_pgpro560_control_file_loss. File /global/pg_control doesn't removed permanently
1 parente101bfd commit94fd54a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎tests/pgpro560.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ def test_pgpro560_control_file_loss(self):
3232
node.slow_start()
3333

3434
file=os.path.join(node.base_dir,'data','global','pg_control')
35-
os.remove(file)
35+
# Not delete this file permanently
36+
os.rename(file,os.path.join(node.base_dir,'data','global','pg_control_copy'))
3637

3738
try:
3839
self.backup_node(backup_dir,'node',node,options=['--stream'])
3940
# we should die here because exception is what we expect to happen
4041
self.assertEqual(
41-
1,0,
42-
"Expecting Error because pg_control was deleted.\n "
43-
"Output: {0}\n CMD: {1}".format(repr(self.output),self.cmd))
42+
1,0,
43+
"Expecting Error because pg_control was deleted.\n "
44+
"Output: {0}\n CMD: {1}".format(repr(self.output),self.cmd))
4445
exceptProbackupExceptionase:
4546
self.assertTrue(
4647
'ERROR: Could not open file'ine.messageand
@@ -49,6 +50,8 @@ def test_pgpro560_control_file_loss(self):
4950
repr(e.message),self.cmd))
5051

5152
# Clean after yourself
53+
# Return this file to avoid Postger fail
54+
os.rename(os.path.join(node.base_dir,'data','global','pg_control_copy'),file)
5255
self.del_test_dir(module_name,fname)
5356

5457
deftest_pgpro560_systemid_mismatch(self):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp