2 @message |
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 15:27:46.366
2025-04-18 15:27:46.379 act = <firebird.qa.plugin.Action object at [hex]>
2025-04-18 15:27:46.394 tmp_file = PosixPath('/var/tmp/qa_2024/test_11692/databases-conf.copy')
2025-04-18 15:27:46.405 capsys = <_pytest.capture.CaptureFixture object at [hex]>
2025-04-18 15:27:46.419
2025-04-18 15:27:46.431 @pytest.mark.version('>=3.0.13')
2025-04-18 15:27:46.439 def test_1(act: Action, tmp_file: Path, capsys):
2025-04-18 15:27:46.454
2025-04-18 15:27:46.470 try:
2025-04-18 15:27:46.485 shutil.copy2(act.home_dir/'databases.conf', tmp_file)
2025-04-18 15:27:46.496 with open(act.home_dir/'databases.conf', 'w') as f:
2025-04-18 15:27:46.505 f.write(WRONG_DBCONF)
2025-04-18 15:27:46.519 act.isql(switches = ['-q'], input = f'connect {act.db.dsn};', combine_output = True)
2025-04-18 15:27:46.531 except Error as e:
2025-04-18 15:27:46.543 # Despite crash, no messages were issued here before fix.
2025-04-18 15:27:46.552 print(e)
2025-04-18 15:27:46.563 finally:
2025-04-18 15:27:46.579 shutil.copy2(tmp_file, act.home_dir/'databases.conf')
2025-04-18 15:27:46.588
2025-04-18 15:27:46.597 for line in act.stdout.splitlines():
2025-04-18 15:27:46.610 if (pos := line.lower().find('databases.conf')) > 0:
2025-04-18 15:27:46.624 print(line.lower()[pos:])
2025-04-18 15:27:46.633 else:
2025-04-18 15:27:46.641 print(line)
2025-04-18 15:27:46.647
2025-04-18 15:27:46.654 act.expected_stdout = f"""
2025-04-18 15:27:46.661 Statement failed, SQLSTATE = XX000
2025-04-18 15:27:46.677 databases.conf: illegal line <master parameter is missing before subconfig start '{{'>
2025-04-18 15:27:46.687 Statement failed, SQLSTATE = XX000
2025-04-18 15:27:46.696 databases.conf: illegal line <master parameter is missing before subconfig start '{{'>
2025-04-18 15:27:46.709 """
2025-04-18 15:27:46.721 act.stdout = capsys.readouterr().out
2025-04-18 15:27:46.731 > assert act.clean_stdout == act.clean_expected_stdout
2025-04-18 15:27:46.739 E AssertionError: assert
2025-04-18 15:27:46.745 E - Statement failed, SQLSTATE = XX000
2025-04-18 15:27:46.760 E - databases.conf: illegal line <master parameter is missing before subconfig start '{'>
2025-04-18 15:27:46.773 E - Statement failed, SQLSTATE = XX000
2025-04-18 15:27:46.788 E - databases.conf: illegal line <master parameter is missing before subconfig start '{'>
2025-04-18 15:27:46.800
2025-04-18 15:27:46.814 tests/bugs/gh_8485_test.py:64: AssertionError
2025-04-18 15:27:46.829 ---------------------------- Captured stdout setup -----------------------------
2025-04-18 15:27:46.840 Creating db: localhost:/var/tmp/qa_2024/test_11692/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 = PosixPath('/var/tmp/qa_2024/test_11692/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
|