2 @message |
Server crashed ?
AssertionError: assert
- Statement failed, SQLSTATE = XX000
- databases.conf: illegal line <master parameter is missing before subconfig start '{'>
- Statement failed, SQLSTATE = XX000
- databases.conf: illegal line <master parameter is missing before subconfig start '{'>
LOG DETAILS:
2025-04-18 10:06:12.430
2025-04-18 10:06:12.430 act = <firebird.qa.plugin.Action object at [hex]>
2025-04-18 10:06:12.430 tmp_file = WindowsPath('H:/QA/temp/qa2024.tmp/fbqa/test_11714/databases-conf.copy')
2025-04-18 10:06:12.430 capsys = <_pytest.capture.CaptureFixture object at [hex]>
2025-04-18 10:06:12.430
2025-04-18 10:06:12.430 @pytest.mark.version('>=3.0.13')
2025-04-18 10:06:12.430 def test_1(act: Action, tmp_file: Path, capsys):
2025-04-18 10:06:12.430
2025-04-18 10:06:12.430 try:
2025-04-18 10:06:12.430 shutil.copy2(act.home_dir/'databases.conf', tmp_file)
2025-04-18 10:06:12.430 with open(act.home_dir/'databases.conf', 'w') as f:
2025-04-18 10:06:12.430 f.write(WRONG_DBCONF)
2025-04-18 10:06:12.430 act.isql(switches = ['-q'], input = f'connect {act.db.dsn};', combine_output = True)
2025-04-18 10:06:12.430 except Error as e:
2025-04-18 10:06:12.431 # Despite crash, no messages were issued here before fix.
2025-04-18 10:06:12.431 print(e)
2025-04-18 10:06:12.431 finally:
2025-04-18 10:06:12.431 shutil.copy2(tmp_file, act.home_dir/'databases.conf')
2025-04-18 10:06:12.431
2025-04-18 10:06:12.431 for line in act.stdout.splitlines():
2025-04-18 10:06:12.431 if (pos := line.lower().find('databases.conf')) > 0:
2025-04-18 10:06:12.431 print(line.lower()[pos:])
2025-04-18 10:06:12.431 else:
2025-04-18 10:06:12.431 print(line)
2025-04-18 10:06:12.431
2025-04-18 10:06:12.431 act.expected_stdout = f"""
2025-04-18 10:06:12.431 Statement failed, SQLSTATE = XX000
2025-04-18 10:06:12.431 databases.conf: illegal line <master parameter is missing before subconfig start '{{'>
2025-04-18 10:06:12.431 Statement failed, SQLSTATE = XX000
2025-04-18 10:06:12.431 databases.conf: illegal line <master parameter is missing before subconfig start '{{'>
2025-04-18 10:06:12.431 """
2025-04-18 10:06:12.431 act.stdout = capsys.readouterr().out
2025-04-18 10:06:12.431 > assert act.clean_stdout == act.clean_expected_stdout
2025-04-18 10:06:12.431 E AssertionError: assert
2025-04-18 10:06:12.431 E - Statement failed, SQLSTATE = XX000
2025-04-18 10:06:12.432 E - databases.conf: illegal line <master parameter is missing before subconfig start '{'>
2025-04-18 10:06:12.432 E - Statement failed, SQLSTATE = XX000
2025-04-18 10:06:12.432 E - databases.conf: illegal line <master parameter is missing before subconfig start '{'>
2025-04-18 10:06:12.432
2025-04-18 10:06:12.432 tests\bugs\gh_8485_test.py:64: AssertionError
2025-04-18 10:06:12.432 ---------------------------- Captured stdout setup ----------------------------
2025-04-18 10:06:12.432 Creating db: localhost:H:\QA\temp\qa2024.tmp\fbqa\test_11714\test.fdb [page_size=None, sql_dialect=None, charset='NONE', user=SYSDBA, password=masterkey]
|
3 #text |
act = <firebird.qa.plugin.Action pytest object at [hex]>
tmp_file = WindowsPath('H:/QA/temp/qa2024.tmp/fbqa/test_11714/databases-conf.copy')
capsys = <_pytest.capture.CaptureFixture pytest object at [hex]>
@pytest.mark.version('>=3.0.13')
def test_1(act: Action, tmp_file: Path, capsys):
try:
shutil.copy2(act.home_dir/'databases.conf', tmp_file)
with open(act.home_dir/'databases.conf', 'w') as f:
f.write(WRONG_DBCONF)
act.isql(switches = ['-q'], input = f'connect {act.db.dsn};', combine_output = True)
except Error as e:
# Despite crash, no messages were issued here before fix.
print(e)
finally:
shutil.copy2(tmp_file, act.home_dir/'databases.conf')
for line in act.stdout.splitlines():
if (pos := line.lower().find('databases.conf')) > 0:
print(line.lower()[pos:])
else:
print(line)
act.expected_stdout = f"""
Statement failed, SQLSTATE = XX000
databases.conf: illegal line <master parameter is missing before subconfig start '{{'>
Statement failed, SQLSTATE = XX000
databases.conf: illegal line <master parameter is missing before subconfig start '{{'>
"""
act.stdout = capsys.readouterr().out
> assert act.clean_stdout == act.clean_expected_stdout
E AssertionError: assert
E - Statement failed, SQLSTATE = XX000
E - databases.conf: illegal line <master parameter is missing before subconfig start '{'>
E - Statement failed, SQLSTATE = XX000
E - databases.conf: illegal line <master parameter is missing before subconfig start '{'>
tests\bugs\gh_8485_test.py:64: AssertionError
|