Skip to content

Commit caa7905

Browse files
committed
Added/Updated tests\bugs\gh_7168_test.py: Added 'SQL_SCHEMA_PREFIX' and variable to be substituted in expected_* on FB 6.x
1 parent f75fbbf commit caa7905

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

tests/bugs/gh_7168_test.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
Confirmed problem on 4.0.1.2707 (21-jan-2022), 5.0.0.471 (09-apr-2022): restore fails with error
1515
"firebird.driver.types.DatabaseError: UDR module not loaded" and message after it that can be in localized.
1616
Checked on: 4.0.3.2904, 5.0.0.475 -- all OK.
17+
18+
[29.06.2025] pzotov
19+
Added 'SQL_SCHEMA_PREFIX' and variable to be substituted in expected_* on FB 6.x
20+
Checked on 6.0.0.1020; 5.0.3.1668.
1721
"""
1822

1923
import pytest
@@ -28,22 +32,24 @@
2832

2933
act = python_act('db')
3034

31-
expected_stdout = """
32-
gbak:restoring function CRYPTO_RSA_PRIVATE_KEY
33-
gbak:finishing, closing, and going home
34-
gbak:adjusting the ONLINE and FORCED WRITES flags
35-
"""
36-
3735
fbk_file = temp_file('gh_7168.tmp.fbk')
3836

3937
@pytest.mark.version('>=4.0.1')
4038
def test_1(act: Action, fbk_file: Path, capsys):
4139
zipped_fbk_file = zipfile.Path(act.files_dir / 'gh_7168.zip', at = 'gh_7168.fbk')
4240
fbk_file.write_bytes(zipped_fbk_file.read_bytes())
4341

42+
SQL_SCHEMA_PREFIX = '' if act.is_version('<6') else '"PUBLIC".'
43+
TEST_UDR_NAME = 'CRYPTO_RSA_PRIVATE_KEY' if act.is_version('<6') else f'{SQL_SCHEMA_PREFIX}"CRYPTO_RSA_PRIVATE_KEY"'
44+
expected_stdout = f"""
45+
gbak:restoring function {TEST_UDR_NAME}
46+
gbak:finishing, closing, and going home
47+
gbak:adjusting the ONLINE and FORCED WRITES flags
48+
"""
49+
4450
allowed_patterns = \
4551
(
46-
'gbak:restoring function CRYPTO_RSA_PRIVATE_KEY'
52+
f'gbak:restoring function {TEST_UDR_NAME}'
4753
,'gbak:finishing, closing, and going home'
4854
,'gbak:adjusting the ONLINE and FORCED WRITES flags'
4955
)

0 commit comments

Comments
 (0)