22from packaging import version
33
44from arangoasync .client import ArangoClient
5- from arangoasync .exceptions import (
6- BackupCreateError ,
7- BackupDeleteError ,
8- BackupDownloadError ,
9- BackupGetError ,
10- BackupRestoreError ,
11- BackupUploadError ,
12- )
5+ from arangoasync .exceptions import BackupDeleteError , BackupRestoreError
136
147
158@pytest .mark .asyncio
16- async def test_backup (url , sys_db_name , bad_db , token , enterprise , cluster , db_version ):
9+ async def test_backup (
10+ url , sys_db_name , bad_db , token , enterprise , cluster , db_version , skip_tests
11+ ):
1712 if not enterprise :
1813 pytest .skip ("Backup API is only available in ArangoDB Enterprise Edition" )
1914 if not cluster :
@@ -22,19 +17,13 @@ async def test_backup(url, sys_db_name, bad_db, token, enterprise, cluster, db_v
2217 pytest .skip (
2318 "For simplicity, the backup API is only tested in the latest versions"
2419 )
20+ if "backup" in skip_tests :
21+ pytest .skip ("Skipping backup tests" )
2522
26- with pytest .raises (BackupCreateError ):
27- await bad_db .backup .create ()
28- with pytest .raises (BackupGetError ):
29- await bad_db .backup .get ()
3023 with pytest .raises (BackupRestoreError ):
3124 await bad_db .backup .restore ("foobar" )
3225 with pytest .raises (BackupDeleteError ):
3326 await bad_db .backup .delete ("foobar" )
34- with pytest .raises (BackupUploadError ):
35- await bad_db .backup .upload ()
36- with pytest .raises (BackupDownloadError ):
37- await bad_db .backup .download ()
3827
3928 async with ArangoClient (hosts = url ) as client :
4029 db = await client .db (
0 commit comments