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-03 13:12:14.754
2025-04-03 13:12:14.754 act = <firebird.qa.plugin.Action object at [hex]>
2025-04-03 13:12:14.754 tmp_file = WindowsPath('H:/QA/temp/qa2024.tmp/fbqa/test_11711/databases-conf.copy')
2025-04-03 13:12:14.754 capsys = <_pytest.capture.CaptureFixture object at [hex]>
2025-04-03 13:12:14.754
2025-04-03 13:12:14.755 @pytest.mark.version('>=3.0.13')
2025-04-03 13:12:14.755 def test_1(act: Action, tmp_file: Path, capsys):
2025-04-03 13:12:14.755
2025-04-03 13:12:14.755 try:
2025-04-03 13:12:14.755 shutil.copy2(act.home_dir/'databases.conf', tmp_file)
2025-04-03 13:12:14.755 with open(act.home_dir/'databases.conf', 'w') as f:
2025-04-03 13:12:14.755 f.write(WRONG_DBCONF)
2025-04-03 13:12:14.755 act.isql(switches = ['-q'], input = f'connect {act.db.dsn};', combine_output = True)
2025-04-03 13:12:14.755 except Error as e:
2025-04-03 13:12:14.755 # Despite crash, no messages were issued here before fix.
2025-04-03 13:12:14.755 print(e)
2025-04-03 13:12:14.755 finally:
2025-04-03 13:12:14.755 shutil.copy2(tmp_file, act.home_dir/'databases.conf')
2025-04-03 13:12:14.755
2025-04-03 13:12:14.755 for line in act.stdout.splitlines():
2025-04-03 13:12:14.755 if (pos := line.lower().find('databases.conf')) > 0:
2025-04-03 13:12:14.755 print(line.lower()[pos:])
2025-04-03 13:12:14.755 else:
2025-04-03 13:12:14.755 print(line)
2025-04-03 13:12:14.755
2025-04-03 13:12:14.756 act.expected_stdout = f"""
2025-04-03 13:12:14.756 Statement failed, SQLSTATE = XX000
2025-04-03 13:12:14.756 databases.conf: illegal line <master parameter is missing before subconfig start '{{'>
2025-04-03 13:12:14.756 Statement failed, SQLSTATE = XX000
2025-04-03 13:12:14.756 databases.conf: illegal line <master parameter is missing before subconfig start '{{'>
2025-04-03 13:12:14.756 """
2025-04-03 13:12:14.756 act.stdout = capsys.readouterr().out
2025-04-03 13:12:14.756 > assert act.clean_stdout == act.clean_expected_stdout
2025-04-03 13:12:14.756 E AssertionError: assert
2025-04-03 13:12:14.756 E - Statement failed, SQLSTATE = XX000
2025-04-03 13:12:14.756 E - databases.conf: illegal line <master parameter is missing before subconfig start '{'>
2025-04-03 13:12:14.756 E - Statement failed, SQLSTATE = XX000
2025-04-03 13:12:14.756 E - databases.conf: illegal line <master parameter is missing before subconfig start '{'>
2025-04-03 13:12:14.756
2025-04-03 13:12:14.756 tests\bugs\gh_8485_test.py:64: AssertionError
2025-04-03 13:12:14.756 ---------------------------- Captured stdout setup ----------------------------
2025-04-03 13:12:14.756 Creating db: localhost:H:\QA\temp\qa2024.tmp\fbqa\test_11711\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_11711/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
|