2021-04-26 20:07:00 +02:00
|
|
|
#coding:utf-8
|
|
|
|
|
2022-01-23 20:41:55 +01:00
|
|
|
"""
|
|
|
|
ID: issue-4750
|
|
|
|
ISSUE: 4750
|
|
|
|
TITLE: Properties of user created in Legacy_UserManager padded with space up to 10 character
|
|
|
|
DESCRIPTION:
|
|
|
|
JIRA: CORE-4430
|
2022-02-02 15:46:19 +01:00
|
|
|
FBTEST: bugs.core_4430
|
2022-01-23 20:41:55 +01:00
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-23 20:41:55 +01:00
|
|
|
import pytest
|
|
|
|
from firebird.qa import *
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-23 20:41:55 +01:00
|
|
|
db = db_factory()
|
|
|
|
tmp_user = user_factory('db', name='tmp$c4430', password='123', first_name='john',
|
|
|
|
last_name='smith', plugin='Legacy_UserManager')
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-23 20:41:55 +01:00
|
|
|
test_script = """
|
2021-04-26 20:07:00 +02:00
|
|
|
-- Confirmed padded output in WI-T3.0.0.30809 Firebird 3.0 Alpha 2:
|
|
|
|
-- SEC$USER_NAME TMP$C4430
|
|
|
|
-- FIRST_NAME_WITH_DOT john .
|
|
|
|
-- LAST_NAME_WITH_DOT smith .
|
|
|
|
|
|
|
|
set list on;
|
2022-01-23 20:41:55 +01:00
|
|
|
select
|
|
|
|
sec$user_name,
|
|
|
|
sec$first_name || '.' first_name_with_dot,
|
|
|
|
sec$last_name || '.' last_name_with_dot
|
2021-04-26 20:07:00 +02:00
|
|
|
from sec$users
|
|
|
|
where sec$user_name = upper('tmp$c4430');
|
2021-12-22 20:23:11 +01:00
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-23 20:41:55 +01:00
|
|
|
act = isql_act('db', test_script)
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-23 20:41:55 +01:00
|
|
|
expected_stdout = """
|
2021-04-26 20:07:00 +02:00
|
|
|
SEC$USER_NAME TMP$C4430
|
|
|
|
FIRST_NAME_WITH_DOT john.
|
|
|
|
LAST_NAME_WITH_DOT smith.
|
2021-12-22 20:23:11 +01:00
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
|
|
|
@pytest.mark.version('>=3.0')
|
2022-01-23 20:41:55 +01:00
|
|
|
def test_1(act: Action, tmp_user: User):
|
|
|
|
act.expected_stdout = expected_stdout
|
|
|
|
act.execute()
|
|
|
|
assert act.clean_stdout == act.clean_expected_stdout
|
2021-04-26 20:07:00 +02:00
|
|
|
|