2 @message |
AssertionError: assert
CLIENT_OS_USER_CHECK: OK.
- CLIENT_VERSION_CHECK: OK.
+ CLIENT_VERSION_CHECK: Unexpected: rdb$get_context('SYSTEM', 'CLIENT_VERSION')=LI-V4.0.5.3091 Firebird 4.0 HQbird, chk_fb_vers=LI-V4.0.5.3091 Firebird 4.0 HQbird
+ LI-V4.0.5.3091 Firebird 4.0 HQbird/tcp (deb10build1)/P17:C
+ LI-V4.0.5.3091 Firebird 4.0 HQbird/tcp (deb10build1)/P17:C
LOG DETAILS:
2024-05-09 00:16:57.299
2024-05-09 00:16:57.304 act = <firebird.qa.plugin.Action object at [hex]>
2024-05-09 00:16:57.308 capsys = <_pytest.capture.CaptureFixture object at [hex]>
2024-05-09 00:16:57.313
2024-05-09 00:16:57.317 @pytest.mark.version('>=4.0')
2024-05-09 00:16:57.322 def test_1(act: Action, capsys):
2024-05-09 00:16:57.328 os_user = getpass.getuser()
2024-05-09 00:16:57.333 with act.db.connect() as con:
2024-05-09 00:16:57.337 fb_vers = con.info.firebird_version
2024-05-09 00:16:57.342 cur = con.cursor()
2024-05-09 00:16:57.346
2024-05-09 00:16:57.351 test_sql = f"""
2024-05-09 00:16:57.355 select
2024-05-09 00:16:57.360 iif( lower(system_context_client_os_user) = lower(chk_os_user)
2024-05-09 00:16:57.364 ,'OK.'
2024-05-09 00:16:57.369 ,q'#Unexpected: rdb$get_context('SYSTEM', 'CLIENT_OS_USER')=#'
2024-05-09 00:16:57.374 || coalesce(system_context_client_os_user, '[null]')
2024-05-09 00:16:57.378 || ', chk_os_user='
2024-05-09 00:16:57.383 || coalesce(chk_os_user, '[null]')
2024-05-09 00:16:57.387 ) as client_os_user_check
2024-05-09 00:16:57.392 ,
2024-05-09 00:16:57.396 iif( system_context_client_version = chk_fb_vers
2024-05-09 00:16:57.401 ,'OK.'
2024-05-09 00:16:57.405 ,q'#Unexpected: rdb$get_context('SYSTEM', 'CLIENT_VERSION')=#'
2024-05-09 00:16:57.410 || coalesce(system_context_client_version, '[null]')
2024-05-09 00:16:57.416 || ', chk_fb_vers='
2024-05-09 00:16:57.421 || coalesce(chk_fb_vers, '[null]')
2024-05-09 00:16:57.426 ) as client_version_check
2024-05-09 00:16:57.431 from (
2024-05-09 00:16:57.435 select
2024-05-09 00:16:57.442 rdb$get_context('SYSTEM', 'CLIENT_OS_USER') as system_context_client_os_user
2024-05-09 00:16:57.447 ,rdb$get_context('SYSTEM', 'CLIENT_VERSION') as system_context_client_version
2024-05-09 00:16:57.451 ,q'*{os_user}*' as chk_os_user
2024-05-09 00:16:57.456 ,q'*{fb_vers}*' as chk_fb_vers
2024-05-09 00:16:57.460 from rdb$database
2024-05-09 00:16:57.465 );
2024-05-09 00:16:57.469 """
2024-05-09 00:16:57.474
2024-05-09 00:16:57.479 for r in cur.execute(test_sql):
2024-05-09 00:16:57.484 for i,col in enumerate(cur.description):
2024-05-09 00:16:57.489 print((col[0] +':').ljust(32), r[i])
2024-05-09 00:16:57.493
2024-05-09 00:16:57.498 expected_stdout = """
2024-05-09 00:16:57.502 CLIENT_OS_USER_CHECK: OK.
2024-05-09 00:16:57.509 CLIENT_VERSION_CHECK: OK.
2024-05-09 00:16:57.513 """
2024-05-09 00:16:57.518
2024-05-09 00:16:57.522 act.expected_stdout = expected_stdout
2024-05-09 00:16:57.527 act.stdout = capsys.readouterr().out
2024-05-09 00:16:57.532 > assert act.clean_stdout == act.clean_expected_stdout
2024-05-09 00:16:57.537 E AssertionError: assert
2024-05-09 00:16:57.542 E CLIENT_OS_USER_CHECK: OK.
2024-05-09 00:16:57.546 E - CLIENT_VERSION_CHECK: OK.
2024-05-09 00:16:57.551 E + CLIENT_VERSION_CHECK: Unexpected: rdb$get_context('SYSTEM', 'CLIENT_VERSION')=LI-V4.0.5.3091 Firebird 4.0 HQbird, chk_fb_vers=LI-V4.0.5.3091 Firebird 4.0 HQbird
2024-05-09 00:16:57.556 E + LI-V4.0.5.3091 Firebird 4.0 HQbird/tcp (deb10build1)/P17:C
2024-05-09 00:16:57.560 E + LI-V4.0.5.3091 Firebird 4.0 HQbird/tcp (deb10build1)/P17:C
2024-05-09 00:16:57.565
2024-05-09 00:16:57.570 tests/bugs/gh_7818_test.py:69: AssertionError
2024-05-09 00:16:57.574 ---------------------------- Captured stdout setup -----------------------------
2024-05-09 00:16:57.580 Cached db: db-13.0-None-None-NONE.fdb [page_size=None, sql_dialect=None, charset='NONE'
|
3 #text |
act = <firebird.qa.plugin.Action pytest object at [hex]>
capsys = <_pytest.capture.CaptureFixture pytest object at [hex]>
@pytest.mark.version('>=4.0')
def test_1(act: Action, capsys):
os_user = getpass.getuser()
with act.db.connect() as con:
fb_vers = con.info.firebird_version
cur = con.cursor()
test_sql = f"""
select
iif( lower(system_context_client_os_user) = lower(chk_os_user)
,'OK.'
,q'#Unexpected: rdb$get_context('SYSTEM', 'CLIENT_OS_USER')=#'
|| coalesce(system_context_client_os_user, '[null]')
|| ', chk_os_user='
|| coalesce(chk_os_user, '[null]')
) as client_os_user_check
,
iif( system_context_client_version = chk_fb_vers
,'OK.'
,q'#Unexpected: rdb$get_context('SYSTEM', 'CLIENT_VERSION')=#'
|| coalesce(system_context_client_version, '[null]')
|| ', chk_fb_vers='
|| coalesce(chk_fb_vers, '[null]')
) as client_version_check
from (
select
rdb$get_context('SYSTEM', 'CLIENT_OS_USER') as system_context_client_os_user
,rdb$get_context('SYSTEM', 'CLIENT_VERSION') as system_context_client_version
,q'*{os_user}*' as chk_os_user
,q'*{fb_vers}*' as chk_fb_vers
from rdb$database
);
"""
for r in cur.execute(test_sql):
for i,col in enumerate(cur.description):
print((col[0] +':').ljust(32), r[i])
expected_stdout = """
CLIENT_OS_USER_CHECK: OK.
CLIENT_VERSION_CHECK: OK.
"""
act.expected_stdout = expected_stdout
act.stdout = capsys.readouterr().out
> assert act.clean_stdout == act.clean_expected_stdout
E AssertionError: assert
E CLIENT_OS_USER_CHECK: OK.
E - CLIENT_VERSION_CHECK: OK.
E + CLIENT_VERSION_CHECK: Unexpected: rdb$get_context('SYSTEM', 'CLIENT_VERSION')=LI-V4.0.5.3091 Firebird 4.0 HQbird, chk_fb_vers=LI-V4.0.5.3091 Firebird 4.0 HQbird
E + LI-V4.0.5.3091 Firebird 4.0 HQbird/tcp (deb10build1)/P17:C
E + LI-V4.0.5.3091 Firebird 4.0 HQbird/tcp (deb10build1)/P17:C
tests/bugs/gh_7818_test.py:69: AssertionError
|