Skip to content

[Key Vault] Skip tests failing with SAS issues #22351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ def __init__(self, *args, **kwargs):
@all_api_versions()
@backup_client_setup
def test_full_backup_and_restore(self, client):
if self.is_live:
pytest.skip("SAS token failures are causing sev2 alerts for service team")

# backup the vault
backup_poller = client.begin_backup(self.container_uri, self.sas_token)
backup_operation = backup_poller.result()
Expand Down Expand Up @@ -67,6 +70,9 @@ def test_full_backup_and_restore_rehydration(self, client):
@all_api_versions()
@backup_client_setup
def test_selective_key_restore(self, client):
if self.is_live:
pytest.skip("SAS token failures are causing sev2 alerts for service team")

# create a key to selectively restore
key_client = self.create_key_client(self.managed_hsm_url)
key_name = self.get_resource_name("selective-restore-test-key")
Expand Down Expand Up @@ -116,6 +122,7 @@ def test_backup_client_polling(self, client):
# rehydrate a poller with a continuation token of a completed operation
late_rehydrated = client.begin_backup(self.container_uri, self.sas_token, continuation_token=token)
assert late_rehydrated.status() == "Succeeded"
late_rehydrated.wait()

# restore the backup
restore_poller = client.begin_restore(backup_operation.folder_url, self.sas_token)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def __init__(self, *args, **kwargs):
@all_api_versions()
@backup_client_setup
async def test_full_backup_and_restore(self, client):
if self.is_live:
pytest.skip("SAS token failures are causing sev2 alerts for service team")

# backup the vault
backup_poller = await client.begin_backup(self.container_uri, self.sas_token)
backup_operation = await backup_poller.result()
Expand Down Expand Up @@ -65,6 +68,9 @@ async def test_full_backup_and_restore_rehydration(self, client):
@all_api_versions()
@backup_client_setup
async def test_selective_key_restore(self, client):
if self.is_live:
pytest.skip("SAS token failures are causing sev2 alerts for service team")

# create a key to selectively restore
key_client = self.create_key_client(self.managed_hsm_url, is_async=True)
key_name = self.get_resource_name("selective-restore-test-key")
Expand Down Expand Up @@ -112,6 +118,7 @@ async def test_backup_client_polling(self, client):
# rehydrate a poller with a continuation token of a completed operation
late_rehydrated = await client.begin_backup(self.container_uri, self.sas_token, continuation_token=token)
assert late_rehydrated.status() == "Succeeded"
await late_rehydrated.wait()

# restore the backup
restore_poller = await client.begin_restore(backup_operation.folder_url, self.sas_token)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# ------------------------------------
import time

import pytest

from _shared.test_case import KeyVaultTestCase
from _test_case import AdministrationTestCase, backup_client_setup, get_decorator

Expand All @@ -18,6 +20,9 @@ def __init__(self, *args, **kwargs):
@all_api_versions()
@backup_client_setup
def test_example_backup_and_restore(self, client):
if self.is_live:
pytest.skip("SAS token failures are causing sev2 alerts for service team")

backup_client = client
container_uri = self.container_uri
sas_token = self.sas_token
Expand Down Expand Up @@ -53,6 +58,9 @@ def test_example_backup_and_restore(self, client):
@all_api_versions()
@backup_client_setup
def test_example_selective_key_restore(self, client):
if self.is_live:
pytest.skip("SAS token failures are causing sev2 alerts for service team")

# create a key to selectively restore
key_client = self.create_key_client(self.managed_hsm_url)
key_name = self.get_resource_name("selective-restore-test-key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# ------------------------------------
import asyncio

import pytest

from _shared.test_case_async import KeyVaultTestCase
from _test_case import AdministrationTestCase, backup_client_setup, get_decorator

Expand All @@ -18,6 +20,9 @@ def __init__(self, *args, **kwargs):
@all_api_versions()
@backup_client_setup
async def test_example_backup_and_restore(self, client):
if self.is_live:
pytest.skip("SAS token failures are causing sev2 alerts for service team")

backup_client = client
container_uri = self.container_uri
sas_token = self.sas_token
Expand Down Expand Up @@ -53,6 +58,9 @@ async def test_example_backup_and_restore(self, client):
@all_api_versions()
@backup_client_setup
async def test_example_selective_key_restore(self, client):
if self.is_live:
pytest.skip("SAS token failures are causing sev2 alerts for service team")

# create a key to selectively restore
key_client = self.create_key_client(self.managed_hsm_url, is_async=True)
key_name = self.get_resource_name("selective-restore-test-key")
Expand Down