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

Fixed etag bug #13078

Merged
merged 8 commits into from
Aug 13, 2020
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/sdk/eventhub/ @annatisch @yunhaoling @YijunXieMS

# PRLabel: %Storage
/sdk/storage/ @amishra-dev @zezha-msft @annatisch @rakshith91 @xiafu-msft @kasobol-msft
/sdk/storage/ @amishra-dev @zezha-msft @annatisch @rakshith91 @xiafu-msft @tasherif-msft @kasobol-msft

/sdk/applicationinsights/ @alexeldeib

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ src/build

# [begoldsm] ignore virtual env if it exists.
adlEnv/

venv/
code_reports

# Azure Storage test credentials
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def acquire(self, lease_duration=-1, **kwargs):
process_storage_error(error)
self.id = response.get('lease_id') # type: str
self.last_modified = response.get('last_modified') # type: datetime
self.etag = kwargs.get('etag') # type: str
self.etag = response.get('etag') # type: str

@distributed_trace
def renew(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ async def acquire(self, lease_duration=-1, **kwargs):
process_storage_error(error)
self.id = response.get('lease_id') # type: str
self.last_modified = response.get('last_modified') # type: datetime
self.etag = kwargs.get('etag') # type: str
self.etag = response.get('etag') # type: str

@distributed_trace_async
async def renew(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1450,6 +1450,8 @@ def test_lease_blob_with_if_match(self, resource_group, location, storage_accoun
# Assert
self.assertIsInstance(lease, BlobLeaseClient)
self.assertIsNotNone(lease.id)
self.assertIsNotNone(lease.etag)
self.assertEqual(lease.etag, etag)

@GlobalStorageAccountPreparer()
def test_lease_blob_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,8 @@ async def test_lease_blob_with_if_match(self, resource_group, location, storage_
# Assert
self.assertIsInstance(lease, BlobLeaseClient)
self.assertIsNotNone(lease.id)
self.assertIsNotNone(lease.etag)
self.assertEqual(lease.etag, etag)

@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
Expand Down