|
14 | 14 | Confirmed problem on 4.0.1.2707 (21-jan-2022), 5.0.0.471 (09-apr-2022): restore fails with error
|
15 | 15 | "firebird.driver.types.DatabaseError: UDR module not loaded" and message after it that can be in localized.
|
16 | 16 | 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. |
17 | 21 | """
|
18 | 22 |
|
19 | 23 | import pytest
|
|
28 | 32 |
|
29 | 33 | act = python_act('db')
|
30 | 34 |
|
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 |
| - |
37 | 35 | fbk_file = temp_file('gh_7168.tmp.fbk')
|
38 | 36 |
|
39 | 37 | @pytest.mark.version('>=4.0.1')
|
40 | 38 | def test_1(act: Action, fbk_file: Path, capsys):
|
41 | 39 | zipped_fbk_file = zipfile.Path(act.files_dir / 'gh_7168.zip', at = 'gh_7168.fbk')
|
42 | 40 | fbk_file.write_bytes(zipped_fbk_file.read_bytes())
|
43 | 41 |
|
| 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 | + |
44 | 50 | allowed_patterns = \
|
45 | 51 | (
|
46 |
| - 'gbak:restoring function CRYPTO_RSA_PRIVATE_KEY' |
| 52 | + f'gbak:restoring function {TEST_UDR_NAME}' |
47 | 53 | ,'gbak:finishing, closing, and going home'
|
48 | 54 | ,'gbak:adjusting the ONLINE and FORCED WRITES flags'
|
49 | 55 | )
|
|
0 commit comments