Skip to content

Commit

Permalink
Add CANCELED status and include it in the test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrancoa committed Sep 13, 2024
1 parent 2a00148 commit 1ed127a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion integration_v3/test_backup_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,9 @@ def test_cancel_backup(client: weaviate.WeaviateClient) -> None:

with pytest.raises(UnexpectedStatusCodeError):
assert client.backup.cancel_backup(backup_id=backup_id, backend=BACKEND)


status_resp = client.backup.get_create_status(backup_id=backup_id, backend=BACKEND)
assert status_resp.status == BackupStatus.CANCELED
_ = client.backup.list_backups(backend=BACKEND)
# depends on the final implementation
# assert len(backups) == 0
1 change: 1 addition & 0 deletions weaviate/backup/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class BackupStatus(str, Enum):
TRANSFERRED = "TRANSFERRED"
SUCCESS = "SUCCESS"
FAILED = "FAILED"
CANCELED = "CANCELED"


class _BackupConfigBase(BaseModel):
Expand Down

0 comments on commit 1ed127a

Please sign in to comment.