Skip to content
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

[Blob][Versioning]Disable Versioning Live Test #12281

Merged
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
1 change: 1 addition & 0 deletions sdk/storage/azure-storage-blob/tests/test_append_blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def test_create_blob(self, resource_group, location, storage_account, storage_ac
self.assertEqual(blob_properties.etag, create_resp.get('etag'))
self.assertEqual(blob_properties.last_modified, create_resp.get('last_modified'))

@pytest.mark.playback_test_only
@GlobalStorageAccountPreparer()
def test_get_blob_properties_using_vid(self, resource_group, location, storage_account, storage_account_key):
# Arrange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ async def test_create_blob_async(self, resource_group, location, storage_account
self.assertEqual(blob_properties.etag, create_resp.get('etag'))
self.assertEqual(blob_properties.last_modified, create_resp.get('last_modified'))

@pytest.mark.playback_test_only
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_get_blob_properties_using_vid(self, resource_group, location, storage_account, storage_account_key):
Expand Down
6 changes: 6 additions & 0 deletions sdk/storage/azure-storage-blob/tests/test_common_blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def test_create_blob_with_special_chars(self, resource_group, location, storage_
data = blob.download_blob(encoding='utf-8')
self.assertEqual(data.readall(), blob_data)

@pytest.mark.playback_test_only
@GlobalStorageAccountPreparer()
def test_create_blob_and_download_blob_with_vid(self, resource_group, location, storage_account, storage_account_key):
self._setup(storage_account, storage_account_key)
Expand Down Expand Up @@ -614,6 +615,7 @@ def test_set_blob_metadata_with_upper_case(self, resource_group, location, stora
self.assertEqual(md['UP'], 'UPval')
self.assertFalse('up' in md)

@pytest.mark.playback_test_only
@pytest.mark.live_test_only
@GlobalStorageAccountPreparer()
def test_set_blob_metadata_returns_vid(self, resource_group, location, storage_account, storage_account_key):
Expand Down Expand Up @@ -648,6 +650,7 @@ def test_delete_blob_with_existing_blob(self, resource_group, location, storage_
# Assert
self.assertIsNone(resp)

@pytest.mark.playback_test_only
@GlobalStorageAccountPreparer()
def test_delete_specific_blob_version(self, resource_group, location, storage_account, storage_account_key):
self._setup(storage_account, storage_account_key)
Expand All @@ -668,6 +671,7 @@ def test_delete_specific_blob_version(self, resource_group, location, storage_ac
self.assertIsNone(resp)
self.assertTrue(len(blob_list) > 0)

@pytest.mark.playback_test_only
@pytest.mark.live_test_only
@GlobalStorageAccountPreparer()
def test_delete_blob_version_with_blob_sas(self, resource_group, location, storage_account, storage_account_key):
Expand Down Expand Up @@ -750,6 +754,7 @@ def test_delete_blob_snapshots(self, resource_group, location, storage_account,
self.assertEqual(len(blobs), 1)
self.assertIsNone(blobs[0].snapshot)

@pytest.mark.playback_test_only
@GlobalStorageAccountPreparer()
def test_create_blob_snapshot_returns_vid(self, resource_group, location, storage_account, storage_account_key):
self._setup(storage_account, storage_account_key)
Expand Down Expand Up @@ -1020,6 +1025,7 @@ def test_copy_blob_with_existing_blob(self, resource_group, location, storage_ac
copy_content = copyblob.download_blob().readall()
self.assertEqual(copy_content, self.byte_data)

@pytest.mark.playback_test_only
@GlobalStorageAccountPreparer()
def test_copy_blob_returns_vid(self, resource_group, location, storage_account, storage_account_key):
self._setup(storage_account, storage_account_key)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ async def test_create_blob_with_special_chars(self, resource_group, location, st
content = data.decode('utf-8')
self.assertEqual(content, blob_data)

@pytest.mark.playback_test_only
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_create_blob_and_download_blob_with_vid(self, resource_group, location, storage_account,
Expand Down Expand Up @@ -724,6 +725,7 @@ async def test_set_blob_metadata_with_upper_case(self, resource_group, location,
self.assertEqual(md['UP'], 'UPval')
self.assertFalse('up' in md)

@pytest.mark.playback_test_only
@pytest.mark.live_test_only
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
Expand Down Expand Up @@ -762,6 +764,7 @@ async def test_delete_blob_with_existing_blob(self, resource_group, location, st
# Assert
self.assertIsNone(resp)

@pytest.mark.playback_test_only
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_delete_specific_blob_version(self, resource_group, location, storage_account, storage_account_key):
Expand All @@ -788,6 +791,7 @@ async def test_delete_specific_blob_version(self, resource_group, location, stor
self.assertIsNone(resp)
self.assertTrue(len(blob_list) > 0)

@pytest.mark.playback_test_only
@pytest.mark.live_test_only
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
Expand Down Expand Up @@ -879,6 +883,7 @@ async def test_delete_blob_snapshots(self, resource_group, location, storage_acc
self.assertEqual(len(blobs), 1)
self.assertIsNone(blobs[0].snapshot)

@pytest.mark.playback_test_only
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_create_blob_snapshot_returns_vid(self, resource_group, location, storage_account, storage_account_key):
Expand Down Expand Up @@ -1178,6 +1183,7 @@ async def test_soft_delete_with_leased_blob(self, resource_group, location, stor
finally:
await self._disable_soft_delete()

@pytest.mark.playback_test_only
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_copy_blob_returns_vid(self, resource_group, location, storage_account, storage_account_key):
Expand Down
1 change: 1 addition & 0 deletions sdk/storage/azure-storage-blob/tests/test_page_blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def test_create_blob(self, resource_group, location, storage_account, storage_ac
self.assertIsNotNone(resp.get('last_modified'))
self.assertTrue(blob.get_blob_properties())

@pytest.mark.playback_test_only
@GlobalStorageAccountPreparer()
def test_create_page_blob_returns_vid(self, resource_group, location, storage_account, storage_account_key):
bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ async def test_create_blob(self, resource_group, location, storage_account, stor
self.assertIsNotNone(resp.get('last_modified'))
self.assertTrue(await blob.get_blob_properties())

@pytest.mark.playback_test_only
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_create_page_blob_returns_vid(self, resource_group, location, storage_account, storage_account_key):
Expand Down