From d52c841d7d278e731fbe71abfe2d411a14de00d5 Mon Sep 17 00:00:00 2001 From: Pradeep Chhetri Date: Sun, 29 Jan 2023 11:35:00 +0800 Subject: [PATCH] Fix test --- tests/integration/test_backup_restore_new/test.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/integration/test_backup_restore_new/test.py b/tests/integration/test_backup_restore_new/test.py index 16f34012bec..b11f55d4d45 100644 --- a/tests/integration/test_backup_restore_new/test.py +++ b/tests/integration/test_backup_restore_new/test.py @@ -430,17 +430,19 @@ def test_zip_archive_with_settings(): assert instance.query("SELECT count(), sum(x) FROM test.table") == "100\t4950\n" -def test_zip_archive_with_bad_settings(): - backup_name = f"Disk('backups', 'archive_with_bad_settings.zip')" +def test_zip_archive_with_bad_compression_method(): + backup_name = f"Disk('backups', 'archive_with_bad_compression_method.zip')" create_and_fill_table() assert instance.query("SELECT count(), sum(x) FROM test.table") == "100\t4950\n" + + expected_error = "Unknown compression method specified for a zip archive" assert expected_error in instance.query_and_get_error( - f"BACKUP TABLE test.table TO {backup_name} SETTINGS id='archive_with_bad_settings', compression_method='foobar'" + f"BACKUP TABLE test.table TO {backup_name} SETTINGS id='archive_with_bad_compression_method', compression_method='foobar'" ) assert ( instance.query( - "SELECT status FROM system.backups WHERE id='archive_with_bad_settings'" + "SELECT status FROM system.backups WHERE id='archive_with_bad_compression_method'" ) == "BACKUP_FAILED\n" )