Merge pull request #46888 from vitlibar/fix-test_async_backups_to_same_destination

Fix test test_async_backups_to_same_destination.
This commit is contained in:
Alexey Milovidov 2023-02-26 11:36:18 +03:00 committed by GitHub
commit 9ac48dddb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -648,24 +648,15 @@ def test_async_backups_to_same_destination(interface):
"",
)
ids_succeeded = (
instance.query(
f"SELECT id FROM system.backups WHERE id IN {ids_for_query} AND status == 'BACKUP_CREATED'"
)
.rstrip("\n")
.split("\n")
)
ids_succeeded = instance.query(
f"SELECT id FROM system.backups WHERE id IN {ids_for_query} AND status == 'BACKUP_CREATED'"
).splitlines()
ids_failed = (
instance.query(
f"SELECT id FROM system.backups WHERE id IN {ids_for_query} AND status == 'BACKUP_FAILED'"
)
.rstrip("\n")
.split("\n")
)
ids_failed = instance.query(
f"SELECT id FROM system.backups WHERE id IN {ids_for_query} AND status == 'BACKUP_FAILED'"
).splitlines()
assert len(ids_succeeded) == 1
assert len(ids_failed) <= 1
assert set(ids_succeeded + ids_failed) == set(ids)
# Check that the first backup is all right.