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

35 lines
922 B
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-25 22:55:48 +01:00
"""
ID: issue-5365
ISSUE: 5365
TITLE: "Invalid BLOB ID" error
DESCRIPTION:
JIRA: CORE-5078
FBTEST: bugs.core_5078
2022-01-25 22:55:48 +01:00
"""
2021-04-26 20:07:00 +02:00
import pytest
2021-11-26 19:20:43 +01:00
from pathlib import Path
import zipfile
2022-01-25 22:55:48 +01:00
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
act = python_act('db')
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
fbk_file = temp_file('tmp_core_5078.fbk')
fdb_file = temp_file('tmp_core_5078.fdb')
2021-04-26 20:07:00 +02:00
2021-11-26 19:20:43 +01:00
@pytest.mark.version('>=2.5.6')
2022-01-25 22:55:48 +01:00
def test_1(act: Action, fbk_file: Path, fdb_file: Path):
zipped_fbk_file = zipfile.Path(act.files_dir / 'core_5078.zip',
2021-11-26 19:20:43 +01:00
at='tmp_core_5078.fbk')
2022-01-25 22:55:48 +01:00
fbk_file.write_bytes(zipped_fbk_file.read_bytes())
with act.connect_server() as srv:
srv.database.restore(database=fdb_file, backup=fbk_file)
2021-11-26 19:20:43 +01:00
srv.wait()
# This should execute without errors
2022-01-25 22:55:48 +01:00
act.isql(switches=[str(fdb_file)], input='set list on; select * from do_changeTxStatus;',
2021-11-26 19:20:43 +01:00
connect_db=False)