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

48 lines
1.4 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-6710
ISSUE: 6710
TITLE: COMMENT ON USER can only apply comment on user defined by the default usermanager plugin
DESCRIPTION:
There is no sense to check for Legacy_UserManarer: comment for user will not be stored
in the sec$users for this plugin. Test verifies only Srp. Discussed with Alex, 12.03.2021
JIRA: CORE-6479
FBTEST: bugs.core_6479
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
tmp_user = user_factory('db', name='tmp$c6479_srp', password='123', plugin='Srp')
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
comment on user tmp$c6479_srp using plugin Srp is 'This is description for Srp-user';
-- ================
commit;
set list on;
set count on;
select s.sec$user_name, s.sec$plugin, s.sec$description as sec_descr_blob_id
from sec$users s
where s.sec$user_name = upper('tmp$c6479_srp')
;
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=[('SEC_DESCR_BLOB_ID .*', ''), ('[\t ]+', ' ')])
2021-04-26 20:07:00 +02:00
2022-01-27 20:08:36 +01:00
expected_stdout = """
2021-04-26 20:07:00 +02:00
SEC$USER_NAME TMP$C6479_SRP
SEC$PLUGIN Srp
This is description for Srp-user
Records affected: 1
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
@pytest.mark.version('>=3.0.8')
2022-01-27 20:08:36 +01:00
def test_1(act: Action, tmp_user):
act.expected_stdout = expected_stdout
act.execute()
assert act.clean_stdout == act.clean_expected_stdout