forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding Data Source tests with Access Conditions
- Loading branch information
Showing
7 changed files
with
194 additions
and
23 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
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
53 changes: 53 additions & 0 deletions
53
...resources/session-records/createOrUpdateDataSourceIfNotExistsFailsOnExistingResource.json
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,53 @@ | ||
{ | ||
"networkCallRecords" : [ { | ||
"Method" : "PUT", | ||
"Uri" : "https://azs-sdkfb877431ecdf.search.windows.net/datasources('azs-java-test-blob')?api-version=2019-05-06", | ||
"Headers" : { | ||
"Content-Type" : "application/json; charset=utf-8" | ||
}, | ||
"Response" : { | ||
"Pragma" : "no-cache", | ||
"retry-after" : "0", | ||
"request-id" : "968d73ab-2701-4f7b-a539-5003028e5b5b", | ||
"StatusCode" : "201", | ||
"Date" : "Wed, 06 Nov 2019 00:53:36 GMT", | ||
"Strict-Transport-Security" : "max-age=15724800; includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"ETag" : "W/\"0x8D76253C1A91D8A\"", | ||
"elapsed-time" : "48", | ||
"OData-Version" : "4.0", | ||
"Expires" : "-1", | ||
"Content-Length" : "398", | ||
"Body" : "{\"@odata.context\":\"https://azs-sdkfb877431ecdf.search.windows.net/$metadata#datasources/$entity\",\"@odata.etag\":\"\\\"0x8D76253C1A91D8A\\\"\",\"name\":\"azs-java-test-blob\",\"description\":\"Some data source\",\"type\":\"azureblob\",\"subtype\":null,\"credentials\":{\"connectionString\":null},\"container\":{\"name\":\"fakecontainer\",\"query\":\"/fakefolder/\"},\"dataChangeDetectionPolicy\":null,\"dataDeletionDetectionPolicy\":null}", | ||
"Preference-Applied" : "odata.include-annotations=\"*\"", | ||
"Content-Type" : "application/json; odata.metadata=minimal", | ||
"Location" : "https://azs-sdkfb877431ecdf.search.windows.net/datasources('azs-java-test-blob')?api-version=2019-05-06" | ||
}, | ||
"Exception" : null | ||
}, { | ||
"Method" : "PUT", | ||
"Uri" : "https://azs-sdkfb877431ecdf.search.windows.net/datasources('azs-java-test-blob')?api-version=2019-05-06", | ||
"Headers" : { | ||
"Content-Type" : "application/json; charset=utf-8" | ||
}, | ||
"Response" : { | ||
"Pragma" : "no-cache", | ||
"retry-after" : "0", | ||
"request-id" : "d79c7ac2-8f0e-4de8-afbb-835e2f90add0", | ||
"StatusCode" : "412", | ||
"Date" : "Wed, 06 Nov 2019 00:53:36 GMT", | ||
"Strict-Transport-Security" : "max-age=15724800; includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"elapsed-time" : "47", | ||
"OData-Version" : "4.0", | ||
"Expires" : "-1", | ||
"Content-Length" : "160", | ||
"Body" : "{\"error\":{\"code\":\"\",\"message\":\"The precondition given in one of the request headers evaluated to false. No change was made to the resource from this request.\"}}", | ||
"Preference-Applied" : "odata.include-annotations=\"*\"", | ||
"Content-Language" : "en", | ||
"Content-Type" : "application/json; odata.metadata=minimal" | ||
}, | ||
"Exception" : null | ||
} ], | ||
"variables" : [ ] | ||
} |
29 changes: 29 additions & 0 deletions
29
...rch/src/test/resources/session-records/createOrUpdateIfNotExistsSucceedsOnNoResource.json
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,29 @@ | ||
{ | ||
"networkCallRecords" : [ { | ||
"Method" : "PUT", | ||
"Uri" : "https://azs-sdke7653508ac1d.search.windows.net/datasources('azs-java-test-blob')?api-version=2019-05-06", | ||
"Headers" : { | ||
"Content-Type" : "application/json; charset=utf-8" | ||
}, | ||
"Response" : { | ||
"Pragma" : "no-cache", | ||
"retry-after" : "0", | ||
"request-id" : "643177af-e42c-4abf-a606-e22deac12fbd", | ||
"StatusCode" : "201", | ||
"Date" : "Wed, 06 Nov 2019 18:22:42 GMT", | ||
"Strict-Transport-Security" : "max-age=15724800; includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"ETag" : "W/\"0x8D762E650A6F96E\"", | ||
"elapsed-time" : "60", | ||
"OData-Version" : "4.0", | ||
"Expires" : "-1", | ||
"Content-Length" : "398", | ||
"Body" : "{\"@odata.context\":\"https://azs-sdke7653508ac1d.search.windows.net/$metadata#datasources/$entity\",\"@odata.etag\":\"\\\"0x8D762E650A6F96E\\\"\",\"name\":\"azs-java-test-blob\",\"description\":\"Some data source\",\"type\":\"azureblob\",\"subtype\":null,\"credentials\":{\"connectionString\":null},\"container\":{\"name\":\"fakecontainer\",\"query\":\"/fakefolder/\"},\"dataChangeDetectionPolicy\":null,\"dataDeletionDetectionPolicy\":null}", | ||
"Preference-Applied" : "odata.include-annotations=\"*\"", | ||
"Content-Type" : "application/json; odata.metadata=minimal", | ||
"Location" : "https://azs-sdke7653508ac1d.search.windows.net/datasources('azs-java-test-blob')?api-version=2019-05-06" | ||
}, | ||
"Exception" : null | ||
} ], | ||
"variables" : [ ] | ||
} |