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_6134_test.py

46 lines
1.3 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-27 20:08:36 +01:00
"""
ID: issue-6383
ISSUE: 6383
TITLE: Win_Sspi in the list of auth plugins leads message about failed login to be
changed (from 'Your user name and password are not defined...' to 'Missing security context ...')
2022-01-27 20:08:36 +01:00
DESCRIPTION:
Test assumes that firebird.conf parameter AuthClient is: Legacy_Auth,Srp,Win_Sspi.
This is done automaticaally by script that is launched daily on Firebird test machine.
JIRA: CORE-6134
FBTEST: bugs.core_6134
2022-01-27 20:08:36 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-27 20:08:36 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-27 20:08:36 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-27 20:08:36 +01:00
test_script = """
2021-04-26 20:07:00 +02:00
set heading off;
set term ^;
2022-01-27 20:08:36 +01:00
execute block returns (whoami varchar(32)) as
begin
execute statement 'select current_user from rdb$database'
as user 'SYSDBA'
2021-04-26 20:07:00 +02:00
password 'ful1yWr0ng' -- or use here some other password that is for sure invalid
2022-01-27 20:08:36 +01:00
into whoami;
suspend;
2021-04-26 20:07:00 +02:00
end
^
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-27 20:08:36 +01:00
act = isql_act('db', test_script, substitutions=[('-At block line: [\\d]+, col: [\\d]+', '')])
2021-04-26 20:07:00 +02:00
2022-01-27 20:08:36 +01:00
expected_stderr = """
2021-04-26 20:07:00 +02:00
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
@pytest.mark.version('>=3.0.5')
2022-01-27 20:08:36 +01:00
def test_1(act: Action):
act.expected_stderr = expected_stderr
act.execute()
assert act.clean_stderr == act.clean_expected_stderr