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

42 lines
960 B
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-24 20:27:02 +01:00
"""
ID: issue-5026
ISSUE: 5026
TITLE: Message "Statement failed, SQLSTATE = 00000 + unknown ISC error 0" appears when
issuing REVOKE ALL ON ALL FROM <existing_user>
2022-01-24 20:27:02 +01:00
DESCRIPTION:
JIRA: CORE-4719
FBTEST: bugs.core_4719
2022-01-24 20:27:02 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-24 20:27:02 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-24 20:27:02 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-24 20:27:02 +01:00
test_script = """
2021-04-26 20:07:00 +02:00
drop user tmp$c4719;
commit;
create user tmp$c4719 password '123';
commit;
revoke all on all from tmp$c4719;
commit;
drop user tmp$c4719;
commit;
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-24 20:27:02 +01:00
act = isql_act('db', test_script, substitutions=[('Statement failed, SQLSTATE.*', ''),
('record not found for user:.*', '')])
2021-04-26 20:07:00 +02:00
2022-01-24 20:27:02 +01:00
expected_stderr = """
2021-04-26 20:07:00 +02:00
Warning: ALL on ALL is not granted to TMP$C4719.
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-24 20:27:02 +01:00
@pytest.mark.version('>=3')
def test_1(act: Action):
act.expected_stderr = expected_stderr
act.execute()
assert act.clean_stderr == act.clean_expected_stderr
2021-04-26 20:07:00 +02:00