-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added create_table_if_not_exists method to table service client (#13385)
* added create_table_if_not_exists method to table service client, eseentially create table wrapped in try/except block * lint fix * fixing up issy's comments * table_name not name, fixed test bug
- Loading branch information
1 parent
c77746b
commit 43d7ebf
Showing
10 changed files
with
515 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
137 changes: 137 additions & 0 deletions
137
sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_if_exists.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
interactions: | ||
- request: | ||
body: '{"TableName": "pytablesync2c5a0f7d"}' | ||
headers: | ||
Accept: | ||
- application/json;odata=minimalmetadata | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '36' | ||
Content-Type: | ||
- application/json;odata=nometadata | ||
DataServiceVersion: | ||
- '3.0' | ||
Date: | ||
- Thu, 27 Aug 2020 21:42:12 GMT | ||
User-Agent: | ||
- azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) | ||
x-ms-date: | ||
- Thu, 27 Aug 2020 21:42:12 GMT | ||
x-ms-version: | ||
- '2019-07-07' | ||
method: POST | ||
uri: https://storagename.table.core.windows.net/Tables | ||
response: | ||
body: | ||
string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytablesync2c5a0f7d"}' | ||
headers: | ||
cache-control: | ||
- no-cache | ||
content-type: | ||
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8 | ||
date: | ||
- Thu, 27 Aug 2020 21:42:12 GMT | ||
location: | ||
- https://storagename.table.core.windows.net/Tables('pytablesync2c5a0f7d') | ||
server: | ||
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 | ||
transfer-encoding: | ||
- chunked | ||
x-content-type-options: | ||
- nosniff | ||
x-ms-version: | ||
- '2019-07-07' | ||
status: | ||
code: 201 | ||
message: Created | ||
- request: | ||
body: '{"TableName": "pytablesync2c5a0f7d"}' | ||
headers: | ||
Accept: | ||
- application/json;odata=minimalmetadata | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '36' | ||
Content-Type: | ||
- application/json;odata=nometadata | ||
DataServiceVersion: | ||
- '3.0' | ||
Date: | ||
- Thu, 27 Aug 2020 21:42:12 GMT | ||
User-Agent: | ||
- azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) | ||
x-ms-date: | ||
- Thu, 27 Aug 2020 21:42:12 GMT | ||
x-ms-version: | ||
- '2019-07-07' | ||
method: POST | ||
uri: https://storagename.table.core.windows.net/Tables | ||
response: | ||
body: | ||
string: '{"odata.error":{"code":"TableAlreadyExists","message":{"lang":"en-US","value":"The | ||
table specified already exists.\nRequestId:64cfdefd-d002-0057-80ba-7c2831000000\nTime:2020-08-27T21:42:13.5449901Z"}}}' | ||
headers: | ||
cache-control: | ||
- no-cache | ||
content-type: | ||
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8 | ||
date: | ||
- Thu, 27 Aug 2020 21:42:13 GMT | ||
server: | ||
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 | ||
transfer-encoding: | ||
- chunked | ||
x-content-type-options: | ||
- nosniff | ||
x-ms-version: | ||
- '2019-07-07' | ||
status: | ||
code: 409 | ||
message: Conflict | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '0' | ||
Date: | ||
- Thu, 27 Aug 2020 21:42:12 GMT | ||
User-Agent: | ||
- azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) | ||
x-ms-date: | ||
- Thu, 27 Aug 2020 21:42:12 GMT | ||
x-ms-version: | ||
- '2019-07-07' | ||
method: DELETE | ||
uri: https://storagename.table.core.windows.net/Tables('pytablesync2c5a0f7d') | ||
response: | ||
body: | ||
string: '' | ||
headers: | ||
cache-control: | ||
- no-cache | ||
content-length: | ||
- '0' | ||
date: | ||
- Thu, 27 Aug 2020 21:42:13 GMT | ||
server: | ||
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 | ||
x-content-type-options: | ||
- nosniff | ||
x-ms-version: | ||
- '2019-07-07' | ||
status: | ||
code: 204 | ||
message: No Content | ||
version: 1 |
Oops, something went wrong.