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.
createOrUpdateSynonym map if exists tests (Azure#217)
createOrUpdateSynonymMapIfExistsSucceedsOnExistingResource and createOrUpdateSynonymMapIfExistsSucceedsOnExistingResource tests
- Loading branch information
Showing
5 changed files
with
120 additions
and
0 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
28 changes: 28 additions & 0 deletions
28
...src/test/resources/session-records/createOrUpdateSynonymMapIfExistsFailsOnNoResource.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,28 @@ | ||
{ | ||
"networkCallRecords" : [ { | ||
"Method" : "PUT", | ||
"Uri" : "https://azs-sdka7c49316cd9c.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06", | ||
"Headers" : { | ||
"Content-Type" : "application/json; charset=utf-8" | ||
}, | ||
"Response" : { | ||
"Pragma" : "no-cache", | ||
"retry-after" : "0", | ||
"request-id" : "991bdb4c-a156-4872-bbb0-f70ca2f90fe2", | ||
"StatusCode" : "412", | ||
"Date" : "Wed, 30 Oct 2019 21:29:38 GMT", | ||
"Strict-Transport-Security" : "max-age=15724800; includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"elapsed-time" : "28", | ||
"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" : [ ] | ||
} |
53 changes: 53 additions & 0 deletions
53
...resources/session-records/createOrUpdateSynonymMapIfExistsSucceedsOnExistingResource.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-sdka4f17586afe3.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06", | ||
"Headers" : { | ||
"Content-Type" : "application/json; charset=utf-8" | ||
}, | ||
"Response" : { | ||
"Pragma" : "no-cache", | ||
"retry-after" : "0", | ||
"request-id" : "61b047a9-7106-4055-91fe-a3f52a86c642", | ||
"StatusCode" : "201", | ||
"Date" : "Wed, 30 Oct 2019 21:29:18 GMT", | ||
"Strict-Transport-Security" : "max-age=15724800; includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"ETag" : "W/\"0x8D75D8038BFB80E\"", | ||
"elapsed-time" : "37", | ||
"OData-Version" : "4.0", | ||
"Expires" : "-1", | ||
"Content-Length" : "198", | ||
"Body" : "{\"@odata.context\":\"https://azs-sdka4f17586afe3.search.windows.net/$metadata#synonymmaps/$entity\",\"@odata.etag\":\"\\\"0x8D75D8038BFB80E\\\"\",\"name\":\"test-synonym\",\"format\":\"solr\",\"synonyms\":\"word1,word2\"}", | ||
"Preference-Applied" : "odata.include-annotations=\"*\"", | ||
"Content-Type" : "application/json; odata.metadata=minimal", | ||
"Location" : "https://azs-sdka4f17586afe3.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06" | ||
}, | ||
"Exception" : null | ||
}, { | ||
"Method" : "PUT", | ||
"Uri" : "https://azs-sdka4f17586afe3.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06", | ||
"Headers" : { | ||
"Content-Type" : "application/json; charset=utf-8" | ||
}, | ||
"Response" : { | ||
"Pragma" : "no-cache", | ||
"retry-after" : "0", | ||
"request-id" : "96e7375f-dc00-4aa9-b948-2b8376d52a77", | ||
"StatusCode" : "200", | ||
"Date" : "Wed, 30 Oct 2019 21:29:18 GMT", | ||
"Strict-Transport-Security" : "max-age=15724800; includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"ETag" : "W/\"0x8D75D8038D7FF5E\"", | ||
"elapsed-time" : "19", | ||
"OData-Version" : "4.0", | ||
"Expires" : "-1", | ||
"Content-Length" : "205", | ||
"Body" : "{\"@odata.context\":\"https://azs-sdka4f17586afe3.search.windows.net/$metadata#synonymmaps/$entity\",\"@odata.etag\":\"\\\"0x8D75D8038D7FF5E\\\"\",\"name\":\"test-synonym\",\"format\":\"solr\",\"synonyms\":\"mutated1, mutated2\"}", | ||
"Preference-Applied" : "odata.include-annotations=\"*\"", | ||
"Content-Type" : "application/json; odata.metadata=minimal" | ||
}, | ||
"Exception" : null | ||
} ], | ||
"variables" : [ ] | ||
} |