mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +01:00
Added/Updated tests\bugs\core_5630_test.py: splitted expected output for 6.x since some columns in rdb$files now have NULLS instead of zeroes - see notes.
This commit is contained in:
parent
4af274b8e8
commit
eb019319e5
@ -4,10 +4,15 @@
|
||||
ID: issue-5896
|
||||
ISSUE: 5896
|
||||
TITLE: Can't create the shadow file
|
||||
DESCRIPTION:
|
||||
Shadow file is can not be created during restore when -use_all_space option is used
|
||||
DESCRIPTION: Shadow file can not be created during restore when '-use_all_space' option is used
|
||||
JIRA: CORE-5630
|
||||
FBTEST: bugs.core_5630
|
||||
NOTES:
|
||||
[30.12.2024] pzotov
|
||||
Splitted expected out for FB 6.x because columns rdb$file_sequence, rdb$file_start and rdb$file_length
|
||||
have NULLs instead of zeroes, see:
|
||||
https://github.com/FirebirdSQL/firebird/commit/f0740d2a3282ed92a87b8e0547139ba8efe61173
|
||||
("Wipe out multi-file database support (#8047)")
|
||||
Checked on 6.0.0.565
|
||||
"""
|
||||
import locale
|
||||
|
||||
@ -17,24 +22,24 @@ from firebird.qa import *
|
||||
|
||||
db = db_factory()
|
||||
|
||||
act = python_act('db', substitutions=[('Commit current transaction \\(y/n\\)\\?', '')])
|
||||
act = python_act('db', substitutions=[('[ \t]+', ' ')])
|
||||
|
||||
expected_stdout_a = """
|
||||
expected_stdout_5x = """
|
||||
RDB$FILE_SEQUENCE 0
|
||||
RDB$FILE_START 0
|
||||
RDB$FILE_LENGTH 0
|
||||
RDB$FILE_FLAGS 1
|
||||
RDB$SHADOW_NUMBER 1
|
||||
S_HASH_BEFORE 1499836372373901520
|
||||
S_HASH 1499836372373901520
|
||||
"""
|
||||
|
||||
expected_stdout_b = """
|
||||
RDB$FILE_SEQUENCE 0
|
||||
RDB$FILE_START 0
|
||||
RDB$FILE_LENGTH 0
|
||||
expected_stdout_6x = """
|
||||
RDB$FILE_SEQUENCE <null>
|
||||
RDB$FILE_START <null>
|
||||
RDB$FILE_LENGTH <null>
|
||||
RDB$FILE_FLAGS 1
|
||||
RDB$SHADOW_NUMBER 1
|
||||
S_HASH_AFTER 1499836372373901520
|
||||
S_HASH 1499836372373901520
|
||||
"""
|
||||
|
||||
fdb_file = temp_file('core_5630.fdb')
|
||||
@ -70,11 +75,11 @@ def test_1(act: Action, fdb_file: Path, fbk_file: Path, shd_file: Path):
|
||||
commit;
|
||||
set list on;
|
||||
select * from v_shadow_info;
|
||||
select hash( list(s) ) as s_hash_before from test;
|
||||
select hash( list(s) ) as s_hash from test;
|
||||
quit;
|
||||
"""
|
||||
|
||||
act.expected_stdout = expected_stdout_a
|
||||
act.expected_stdout = expected_stdout_5x if act.is_version('<6') else expected_stdout_6x
|
||||
act.isql(switches=['-q'], input = init_ddl, connect_db=False, combine_output = True, io_enc = locale.getpreferredencoding())
|
||||
assert act.clean_stdout == act.clean_expected_stdout
|
||||
#
|
||||
@ -94,12 +99,12 @@ def test_1(act: Action, fdb_file: Path, fbk_file: Path, shd_file: Path):
|
||||
sql_text = """
|
||||
set list on;
|
||||
select * from v_shadow_info;
|
||||
select hash( list(s) ) as s_hash_after from test;
|
||||
select hash( list(s) ) as s_hash from test;
|
||||
"""
|
||||
act.reset()
|
||||
|
||||
#-----------------------------------------------------------------------------------
|
||||
act.expected_stdout = expected_stdout_b
|
||||
act.expected_stdout = expected_stdout_5x if act.is_version('<6') else expected_stdout_6x
|
||||
act.isql(switches=['-q', act.get_dsn(fdb_file)], input=sql_text, connect_db=False, combine_output = True, io_enc = locale.getpreferredencoding())
|
||||
|
||||
assert act.clean_stdout == act.clean_expected_stdout
|
||||
|
Loading…
Reference in New Issue
Block a user