6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-23 14:03:06 +01:00
firebird-qa/tests/bugs/core_1263_test.py

65 lines
1.5 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-19 17:54:56 +01:00
"""
ID: issue-1686
ISSUE: 1686
TITLE: GSec incorrectly processes some switches
DESCRIPTION:
JIRA: CORE-1263
FBTEST: bugs.core_1263
2022-01-19 17:54:56 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-19 17:54:56 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-19 17:54:56 +01:00
db = db_factory()
2021-11-11 18:01:08 +01:00
2022-01-19 17:54:56 +01:00
act = python_act('db')
2021-04-26 20:07:00 +02:00
2022-01-19 17:54:56 +01:00
expected_stderr_a = """
2021-11-11 18:01:08 +01:00
GSEC> invalid switch specified in interactive mode
GSEC> invalid switch specified in interactive mode
GSEC> invalid switch specified in interactive mode
GSEC> invalid switch specified in interactive mode
GSEC> invalid switch specified in interactive mode
GSEC> invalid switch specified
error in switch specifications
GSEC>
"""
2021-04-26 20:07:00 +02:00
2022-01-19 17:54:56 +01:00
commands = """add BADPARAM -pa PWD
2021-11-11 18:01:08 +01:00
add BADPARAM -pas PWD
add BADPARAM -password PWD
add BADPARAM -user USR
add BADPARAM -database DB
add BADPARAM -trusted
quit
"""
2022-01-16 10:03:34 +01:00
@pytest.mark.version('>=3.0')
@pytest.mark.platform('Linux', 'Darwin')
2022-01-19 17:54:56 +01:00
def test_1_a(act: Action):
act.expected_stderr = expected_stderr_a
act.gsec(input=commands)
assert act.clean_stderr == act.clean_expected_stderr
2022-01-16 10:03:34 +01:00
2022-01-19 17:54:56 +01:00
expected_stderr_b = """
2022-01-16 10:03:34 +01:00
GSEC> invalid switch specified in interactive mode
GSEC> invalid switch specified in interactive mode
GSEC> invalid switch specified in interactive mode
GSEC> invalid switch specified in interactive mode
GSEC> invalid switch specified in interactive mode
GSEC> invalid switch specified in interactive mode
GSEC>
"""
@pytest.mark.version('>=3.0')
@pytest.mark.platform('Windows')
2022-01-19 17:54:56 +01:00
def test_1_b(act: Action):
act.expected_stderr = expected_stderr_b
act.gsec(input=commands)
assert act.clean_stderr == act.clean_expected_stderr
2021-04-26 20:07:00 +02:00
2022-01-16 10:03:34 +01:00