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

39 lines
824 B
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-18 11:45:40 +01:00
"""
2022-01-18 20:45:21 +01:00
ID: issue-319
2022-01-18 11:45:40 +01:00
ISSUE: 319
2022-01-18 20:45:21 +01:00
JIRA: CORE-1
2022-01-18 11:45:40 +01:00
TITLE: Server shutdown
DESCRIPTION: Server shuts down when user password is attempted to be modified to a empty string
FBTEST: bugs.core_0001
2022-01-18 11:45:40 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-18 11:45:40 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-18 11:45:40 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-18 11:45:40 +01:00
test_script = """
2021-04-26 20:07:00 +02:00
alter user tmp$c0001 password '';
commit;
2021-12-19 22:25:36 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-18 11:45:40 +01:00
act = isql_act('db', test_script)
2021-04-26 20:07:00 +02:00
2022-01-18 11:45:40 +01:00
expected_stderr = """
2021-04-26 20:07:00 +02:00
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-ALTER USER TMP$C0001 failed
-Password should not be empty string
2021-12-19 22:25:36 +01:00
"""
2022-01-18 11:45:40 +01:00
user = user_factory('db', name='tmp$c0001', password='123')
2021-04-26 20:07:00 +02:00
@pytest.mark.version('>=3.0')
2022-01-18 11:45:40 +01:00
def test_1(act: Action, user: User):
act.expected_stderr = expected_stderr
act.execute()
assert act.clean_stderr == act.clean_expected_stderr
2021-04-26 20:07:00 +02:00