6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 13:33:07 +01:00

Added/Updated tests\functional\shadow\test_create_01.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:
pavel-zotov 2024-12-30 12:05:43 +03:00
parent eb019319e5
commit fab53758ab

View File

@ -2,9 +2,15 @@
""" """
ID: shadow.create-01 ID: shadow.create-01
TITLE: CREATE SHADOW TITLE: CREATE SHADOW: check basic usage
DESCRIPTION: DESCRIPTION:
FBTEST: functional.shadow.create_01 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 pytest import pytest
@ -34,9 +40,9 @@ test_script = """
from rdb$files; from rdb$files;
""" """
act = isql_act('db', test_script) act = isql_act('db', test_script, substitutions=[('[ \t]+', ' ')])
expected_stdout = """ expected_stdout_5x = """
CHECK_SHD_FILE_NAME OK CHECK_SHD_FILE_NAME OK
FILE_SEQUENCE 0 FILE_SEQUENCE 0
FILE_START 0 FILE_START 0
@ -46,8 +52,18 @@ expected_stdout = """
Records affected: 1 Records affected: 1
""" """
expected_stdout_6x = """
CHECK_SHD_FILE_NAME OK
FILE_SEQUENCE <null>
FILE_START <null>
FILE_LENGTH <null>
FILE_FLAGS 1
SHADOW_NUMBER 1
Records affected: 1
"""
@pytest.mark.version('>=3.0') @pytest.mark.version('>=3.0')
def test_1(act: Action): def test_1(act: Action):
act.expected_stdout = expected_stdout act.expected_stdout = expected_stdout_5x if act.is_version('<6') else expected_stdout_6x
act.execute() act.execute()
assert act.clean_stdout == act.clean_expected_stdout assert act.clean_stdout == act.clean_expected_stdout