Skip to content

Commit 2344a63

Browse files
authored
[Key Vault] Skip tests failing with SAS issues (Azure#22351)
1 parent 8068346 commit 2344a63

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

sdk/keyvault/azure-keyvault-administration/tests/test_backup_client.py

+7
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ def __init__(self, *args, **kwargs):
2323
@all_api_versions()
2424
@backup_client_setup
2525
def test_full_backup_and_restore(self, client):
26+
if self.is_live:
27+
pytest.skip("SAS token failures are causing sev2 alerts for service team")
28+
2629
# backup the vault
2730
backup_poller = client.begin_backup(self.container_uri, self.sas_token)
2831
backup_operation = backup_poller.result()
@@ -67,6 +70,9 @@ def test_full_backup_and_restore_rehydration(self, client):
6770
@all_api_versions()
6871
@backup_client_setup
6972
def test_selective_key_restore(self, client):
73+
if self.is_live:
74+
pytest.skip("SAS token failures are causing sev2 alerts for service team")
75+
7076
# create a key to selectively restore
7177
key_client = self.create_key_client(self.managed_hsm_url)
7278
key_name = self.get_resource_name("selective-restore-test-key")
@@ -116,6 +122,7 @@ def test_backup_client_polling(self, client):
116122
# rehydrate a poller with a continuation token of a completed operation
117123
late_rehydrated = client.begin_backup(self.container_uri, self.sas_token, continuation_token=token)
118124
assert late_rehydrated.status() == "Succeeded"
125+
late_rehydrated.wait()
119126

120127
# restore the backup
121128
restore_poller = client.begin_restore(backup_operation.folder_url, self.sas_token)

sdk/keyvault/azure-keyvault-administration/tests/test_backup_client_async.py

+7
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ def __init__(self, *args, **kwargs):
2121
@all_api_versions()
2222
@backup_client_setup
2323
async def test_full_backup_and_restore(self, client):
24+
if self.is_live:
25+
pytest.skip("SAS token failures are causing sev2 alerts for service team")
26+
2427
# backup the vault
2528
backup_poller = await client.begin_backup(self.container_uri, self.sas_token)
2629
backup_operation = await backup_poller.result()
@@ -65,6 +68,9 @@ async def test_full_backup_and_restore_rehydration(self, client):
6568
@all_api_versions()
6669
@backup_client_setup
6770
async def test_selective_key_restore(self, client):
71+
if self.is_live:
72+
pytest.skip("SAS token failures are causing sev2 alerts for service team")
73+
6874
# create a key to selectively restore
6975
key_client = self.create_key_client(self.managed_hsm_url, is_async=True)
7076
key_name = self.get_resource_name("selective-restore-test-key")
@@ -112,6 +118,7 @@ async def test_backup_client_polling(self, client):
112118
# rehydrate a poller with a continuation token of a completed operation
113119
late_rehydrated = await client.begin_backup(self.container_uri, self.sas_token, continuation_token=token)
114120
assert late_rehydrated.status() == "Succeeded"
121+
await late_rehydrated.wait()
115122

116123
# restore the backup
117124
restore_poller = await client.begin_restore(backup_operation.folder_url, self.sas_token)

sdk/keyvault/azure-keyvault-administration/tests/test_examples_administration.py

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# ------------------------------------
55
import time
66

7+
import pytest
8+
79
from _shared.test_case import KeyVaultTestCase
810
from _test_case import AdministrationTestCase, backup_client_setup, get_decorator
911

@@ -18,6 +20,9 @@ def __init__(self, *args, **kwargs):
1820
@all_api_versions()
1921
@backup_client_setup
2022
def test_example_backup_and_restore(self, client):
23+
if self.is_live:
24+
pytest.skip("SAS token failures are causing sev2 alerts for service team")
25+
2126
backup_client = client
2227
container_uri = self.container_uri
2328
sas_token = self.sas_token
@@ -53,6 +58,9 @@ def test_example_backup_and_restore(self, client):
5358
@all_api_versions()
5459
@backup_client_setup
5560
def test_example_selective_key_restore(self, client):
61+
if self.is_live:
62+
pytest.skip("SAS token failures are causing sev2 alerts for service team")
63+
5664
# create a key to selectively restore
5765
key_client = self.create_key_client(self.managed_hsm_url)
5866
key_name = self.get_resource_name("selective-restore-test-key")

sdk/keyvault/azure-keyvault-administration/tests/test_examples_administration_async.py

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# ------------------------------------
55
import asyncio
66

7+
import pytest
8+
79
from _shared.test_case_async import KeyVaultTestCase
810
from _test_case import AdministrationTestCase, backup_client_setup, get_decorator
911

@@ -18,6 +20,9 @@ def __init__(self, *args, **kwargs):
1820
@all_api_versions()
1921
@backup_client_setup
2022
async def test_example_backup_and_restore(self, client):
23+
if self.is_live:
24+
pytest.skip("SAS token failures are causing sev2 alerts for service team")
25+
2126
backup_client = client
2227
container_uri = self.container_uri
2328
sas_token = self.sas_token
@@ -53,6 +58,9 @@ async def test_example_backup_and_restore(self, client):
5358
@all_api_versions()
5459
@backup_client_setup
5560
async def test_example_selective_key_restore(self, client):
61+
if self.is_live:
62+
pytest.skip("SAS token failures are causing sev2 alerts for service team")
63+
5664
# create a key to selectively restore
5765
key_client = self.create_key_client(self.managed_hsm_url, is_async=True)
5866
key_name = self.get_resource_name("selective-restore-test-key")

0 commit comments

Comments
 (0)