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

Commit822fbbf

Browse files
author
Daniel Shelepanov
committed
[PBCKP-326] regex fixed in test_missing_replication_permission_1
Everything between WARNING and FATAL sections is now handled with the [\s\S]*? regex:* [\s\S] is a group that handles any whitespace and non-whitespace character including new lines which are important in this case.* "*" quantifier means zero or more characters. There may as well be nothing between these two sections.* "?" quantifies in this case means greedy search so that we don't match more than we need.
1 parent25e63c5 commit822fbbf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎tests/backup_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3226,10 +3226,11 @@ def test_missing_replication_permission_1(self):
32263226
# Messages for >=14
32273227
# 'WARNING: could not connect to database backupdb: connection to server on socket "/tmp/.s.PGSQL.30983" failed: FATAL: must be superuser or replication role to start walsender'
32283228
# 'WARNING: could not connect to database backupdb: connection to server at "localhost" (127.0.0.1), port 29732 failed: FATAL: must be superuser or replication role to start walsender'
3229+
# OS-dependant messages:
3230+
# 'WARNING: could not connect to database backupdb: connection to server at "localhost" (::1), port 12101 failed: Connection refused\n\tIs the server running on that host and accepting TCP/IP connections?\nconnection to server at "localhost" (127.0.0.1), port 12101 failed: FATAL: must be superuser or replication role to start walsender'
32293231
self.assertRegex(
32303232
output,
3231-
r'WARNING: could not connect to database backupdb: (connection to server (on socket "/tmp/.s.PGSQL.\d+"|at "localhost" \(127.0.0.1\), port \d+) failed: ){0,1}'
3232-
'FATAL: must be superuser or replication role to start walsender')
3233+
r'WARNING: could not connect to database backupdb:[\s\S]*?FATAL: must be superuser or replication role to start walsender')
32333234

32343235
# @unittest.skip("skip")
32353236
deftest_basic_backup_default_transaction_read_only(self):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp