2021-04-26 20:07:00 +02:00
|
|
|
#coding:utf-8
|
2022-01-26 21:10:46 +01:00
|
|
|
|
|
|
|
"""
|
|
|
|
ID: issue-6195
|
|
|
|
ISSUE: 6195
|
|
|
|
TITLE: Crash for "gbak -se -b database nul"
|
|
|
|
DESCRIPTION:
|
|
|
|
JIRA: CORE-5939
|
2022-02-02 15:46:19 +01:00
|
|
|
FBTEST: bugs.core_5939
|
2022-01-26 21:10:46 +01:00
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
|
|
|
import pytest
|
2021-12-10 19:50:31 +01:00
|
|
|
from pathlib import Path
|
2022-01-26 21:10:46 +01:00
|
|
|
from firebird.qa import *
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-26 21:10:46 +01:00
|
|
|
db = db_factory()
|
2021-12-10 19:50:31 +01:00
|
|
|
|
2022-01-26 21:10:46 +01:00
|
|
|
act = python_act('db')
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-26 21:10:46 +01:00
|
|
|
expected_stderr = """
|
2021-04-26 20:07:00 +02:00
|
|
|
gbak: ERROR:service name parameter missing
|
|
|
|
gbak:Exiting before completion due to errors
|
2021-12-10 19:50:31 +01:00
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2021-12-10 19:50:31 +01:00
|
|
|
fbk_file = temp_file('tmp_core_5939.fbk')
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2021-12-10 19:50:31 +01:00
|
|
|
@pytest.mark.version('>=2.5.9')
|
2022-01-26 21:10:46 +01:00
|
|
|
def test_1(act: Action, fbk_file: Path):
|
|
|
|
act.expected_stderr = expected_stderr
|
|
|
|
act.gbak(switches=['-b', act.db.dsn, str(fbk_file), '-se'])
|
|
|
|
assert act.clean_stderr == act.clean_expected_stderr
|