6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 21:43:06 +01:00
firebird-qa/tests/bugs/core_5039_test.py

53 lines
1.7 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
#
# id: bugs.core_5039
# title: Connecting to service with invalid servicename yields incorrect error message
2021-11-26 19:20:43 +01:00
# decription:
# 28.01.2019.
2021-04-26 20:07:00 +02:00
# Name of service manager is ignored in FB 4.0, see http://tracker.firebirdsql.org/browse/CORE-5883
# ("service_mgr" to be cleaned out from connection string completely...")
# Disabled this test to be run on FB 4.0: added record to '%FBT_REPO% ests\\qa4x-exclude-list.txt'.
# Added EMPTY section for FB version 4.0 in this .fbt as one more way to protect from running.
2021-11-26 19:20:43 +01:00
# [pcisar] 26.112021
# "Empty" 4.0 version was removed completelly, as it's not needed with pytest
#
2021-04-26 20:07:00 +02:00
# tracker_id: CORE-5039
# min_versions: ['3.0']
# versions: 3.0, 4.0
# qmid: None
import pytest
2021-11-26 19:20:43 +01:00
from firebird.qa import db_factory, python_act, Action
2021-04-26 20:07:00 +02:00
# version: 3.0
# resources: None
substitutions_1 = []
init_script_1 = """"""
db_1 = db_factory(sql_dialect=3, init=init_script_1)
# test_script_1
#---
2021-11-26 19:20:43 +01:00
#
2021-04-26 20:07:00 +02:00
# db_conn.close()
# runProgram('fbsvcmgr',['localhost:qwe_mnb_zxc_9','user','SYSDBA','password','masterkey','info_server_version'])
2021-11-26 19:20:43 +01:00
#
2021-04-26 20:07:00 +02:00
#---
2021-11-26 19:20:43 +01:00
act_1 = python_act('db_1', substitutions=substitutions_1)
2021-04-26 20:07:00 +02:00
expected_stderr_1 = """
Cannot attach to services manager
-service qwe_mnb_zxc_9 is not defined
2021-11-26 19:20:43 +01:00
"""
@pytest.mark.version('>=3.0,<4')
def test_1(act_1: Action):
act_1.expected_stderr = expected_stderr_1
act_1.svcmgr(switches=['localhost:qwe_mnb_zxc_9', 'user', 'SYSDBA',
'password', 'masterkey', 'info_server_version'],
connect_mngr=False)
assert act_1.clean_stderr == act_1.clean_expected_stderr