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 unit test to verify indexer's skillset can be changed (Azure#275)
* Adding unit test to verify indexer's skillset can be changed Task 1486
- Loading branch information
Showing
4 changed files
with
207 additions
and
3 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
128 changes: 128 additions & 0 deletions
128
sdk/search/azure-search/src/test/resources/session-records/canUpdateIndexerSkillset.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,128 @@ | ||
{ | ||
"networkCallRecords" : [ { | ||
"Method" : "PUT", | ||
"Uri" : "https://azs-sdka1a74632a90c.search-dogfood.windows-int.net/datasources('azs-java-test-sql')?api-version=2019-05-06", | ||
"Headers" : { | ||
"Content-Type" : "application/json; charset=utf-8" | ||
}, | ||
"Response" : { | ||
"Pragma" : "no-cache", | ||
"retry-after" : "0", | ||
"request-id" : "f58410b7-a225-455d-a984-d44f2e016d66", | ||
"StatusCode" : "201", | ||
"Date" : "Sun, 17 Nov 2019 09:44:48 GMT", | ||
"Strict-Transport-Security" : "max-age=15724800; includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"ETag" : "W/\"0x8D76B42C99DBDD1\"", | ||
"elapsed-time" : "52", | ||
"OData-Version" : "4.0", | ||
"Expires" : "-1", | ||
"Content-Length" : "395", | ||
"Body" : "{\"@odata.context\":\"https://azs-sdka1a74632a90c.search-dogfood.windows-int.net/$metadata#datasources/$entity\",\"@odata.etag\":\"\\\"0x8D76B42C99DBDD1\\\"\",\"name\":\"azs-java-test-sql\",\"description\":\"Some data source\",\"type\":\"azuresql\",\"subtype\":null,\"credentials\":{\"connectionString\":null},\"container\":{\"name\":\"GeoNamesRI\",\"query\":null},\"dataChangeDetectionPolicy\":null,\"dataDeletionDetectionPolicy\":null}", | ||
"Preference-Applied" : "odata.include-annotations=\"*\"", | ||
"Content-Type" : "application/json; odata.metadata=minimal", | ||
"Location" : "https://azs-sdka1a74632a90c.search-dogfood.windows-int.net/datasources('azs-java-test-sql')?api-version=2019-05-06" | ||
}, | ||
"Exception" : null | ||
}, { | ||
"Method" : "PUT", | ||
"Uri" : "https://azs-sdka1a74632a90c.search-dogfood.windows-int.net/skillsets('ocr-skillset')?api-version=2019-05-06", | ||
"Headers" : { | ||
"Content-Type" : "application/json; charset=utf-8" | ||
}, | ||
"Response" : { | ||
"Pragma" : "no-cache", | ||
"retry-after" : "0", | ||
"request-id" : "933b2f05-f904-4c0e-9584-58706a02597f", | ||
"StatusCode" : "201", | ||
"Date" : "Sun, 17 Nov 2019 09:44:48 GMT", | ||
"Strict-Transport-Security" : "max-age=15724800; includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"ETag" : "W/\"0x8D76B42C9C3C475\"", | ||
"elapsed-time" : "41", | ||
"OData-Version" : "4.0", | ||
"Expires" : "-1", | ||
"Content-Length" : "708", | ||
"Body" : "{\"@odata.context\":\"https://azs-sdka1a74632a90c.search-dogfood.windows-int.net/$metadata#skillsets/$entity\",\"@odata.etag\":\"\\\"0x8D76B42C9C3C475\\\"\",\"name\":\"ocr-skillset\",\"description\":\"Skillset for testing default configuration\",\"skills\":[{\"@odata.type\":\"#Microsoft.Skills.Vision.OcrSkill\",\"name\":\"myocr\",\"description\":\"Tested OCR skill\",\"context\":\"/document\",\"textExtractionAlgorithm\":null,\"lineEnding\":null,\"defaultLanguageCode\":null,\"detectOrientation\":true,\"inputs\":[{\"name\":\"url\",\"source\":\"/document/url\",\"sourceContext\":null,\"inputs\":[]},{\"name\":\"queryString\",\"source\":\"/document/queryString\",\"sourceContext\":null,\"inputs\":[]}],\"outputs\":[{\"name\":\"text\",\"targetName\":\"mytext\"}]}],\"cognitiveServices\":null}", | ||
"Preference-Applied" : "odata.include-annotations=\"*\"", | ||
"Content-Type" : "application/json; odata.metadata=minimal", | ||
"Location" : "https://azs-sdka1a74632a90c.search-dogfood.windows-int.net/skillsets('ocr-skillset')?api-version=2019-05-06" | ||
}, | ||
"Exception" : null | ||
}, { | ||
"Method" : "PUT", | ||
"Uri" : "https://azs-sdka1a74632a90c.search-dogfood.windows-int.net/indexes('indexforindexers')?allowIndexDowntime=false&api-version=2019-05-06", | ||
"Headers" : { | ||
"Content-Type" : "application/json; charset=utf-8" | ||
}, | ||
"Response" : { | ||
"Pragma" : "no-cache", | ||
"retry-after" : "0", | ||
"request-id" : "018ffdbf-c9d2-4f35-989d-fc5bd896e3a8", | ||
"StatusCode" : "201", | ||
"Date" : "Sun, 17 Nov 2019 09:44:50 GMT", | ||
"Strict-Transport-Security" : "max-age=15724800; includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"ETag" : "W/\"0x8D76B42CA4DAB2F\"", | ||
"elapsed-time" : "785", | ||
"OData-Version" : "4.0", | ||
"Expires" : "-1", | ||
"Content-Length" : "982", | ||
"Body" : "{\"@odata.context\":\"https://azs-sdka1a74632a90c.search-dogfood.windows-int.net/$metadata#indexes/$entity\",\"@odata.etag\":\"\\\"0x8D76B42CA4DAB2F\\\"\",\"name\":\"indexforindexers\",\"defaultScoringProfile\":null,\"fields\":[{\"name\":\"county_name\",\"type\":\"Edm.String\",\"searchable\":false,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"state\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":true,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":false,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]},{\"name\":\"feature_id\",\"type\":\"Edm.String\",\"searchable\":true,\"filterable\":false,\"retrievable\":true,\"sortable\":true,\"facetable\":true,\"key\":true,\"indexAnalyzer\":null,\"searchAnalyzer\":null,\"analyzer\":null,\"synonymMaps\":[]}],\"scoringProfiles\":[],\"corsOptions\":null,\"suggesters\":[],\"analyzers\":[],\"tokenizers\":[],\"tokenFilters\":[],\"charFilters\":[]}", | ||
"Preference-Applied" : "odata.include-annotations=\"*\"", | ||
"Content-Type" : "application/json; odata.metadata=minimal", | ||
"Location" : "https://azs-sdka1a74632a90c.search-dogfood.windows-int.net/indexes('indexforindexers')?allowIndexDowntime=false&api-version=2019-05-06" | ||
}, | ||
"Exception" : null | ||
}, { | ||
"Method" : "PUT", | ||
"Uri" : "https://azs-sdka1a74632a90c.search-dogfood.windows-int.net/indexers('indexer')?api-version=2019-05-06", | ||
"Headers" : { | ||
"Content-Type" : "application/json; charset=utf-8" | ||
}, | ||
"Response" : { | ||
"Pragma" : "no-cache", | ||
"retry-after" : "0", | ||
"request-id" : "640e4a9d-058a-42e8-ab1c-414880006623", | ||
"StatusCode" : "201", | ||
"Date" : "Sun, 17 Nov 2019 09:44:50 GMT", | ||
"Strict-Transport-Security" : "max-age=15724800; includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"ETag" : "W/\"0x8D76B42CA81BE91\"", | ||
"elapsed-time" : "49", | ||
"OData-Version" : "4.0", | ||
"Expires" : "-1", | ||
"Content-Length" : "417", | ||
"Body" : "{\"@odata.context\":\"https://azs-sdka1a74632a90c.search-dogfood.windows-int.net/$metadata#indexers/$entity\",\"@odata.etag\":\"\\\"0x8D76B42CA81BE91\\\"\",\"name\":\"indexer\",\"description\":null,\"dataSourceName\":\"azs-java-test-sql\",\"skillsetName\":null,\"targetIndexName\":\"indexforindexers\",\"disabled\":true,\"schedule\":{\"interval\":\"P1D\",\"startTime\":\"0001-01-01T00:00:00Z\"},\"parameters\":null,\"fieldMappings\":[],\"outputFieldMappings\":[]}", | ||
"Preference-Applied" : "odata.include-annotations=\"*\"", | ||
"Content-Type" : "application/json; odata.metadata=minimal", | ||
"Location" : "https://azs-sdka1a74632a90c.search-dogfood.windows-int.net/indexers('indexer')?api-version=2019-05-06" | ||
}, | ||
"Exception" : null | ||
}, { | ||
"Method" : "PUT", | ||
"Uri" : "https://azs-sdka1a74632a90c.search-dogfood.windows-int.net/indexers('indexer')?api-version=2019-05-06", | ||
"Headers" : { | ||
"Content-Type" : "application/json; charset=utf-8" | ||
}, | ||
"Response" : { | ||
"Pragma" : "no-cache", | ||
"retry-after" : "0", | ||
"request-id" : "d401b671-0915-44cb-8234-6d87a592c3ff", | ||
"StatusCode" : "200", | ||
"Date" : "Sun, 17 Nov 2019 09:44:50 GMT", | ||
"Strict-Transport-Security" : "max-age=15724800; includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"ETag" : "W/\"0x8D76B42CAC5DAEE\"", | ||
"elapsed-time" : "375", | ||
"OData-Version" : "4.0", | ||
"Expires" : "-1", | ||
"Content-Length" : "427", | ||
"Body" : "{\"@odata.context\":\"https://azs-sdka1a74632a90c.search-dogfood.windows-int.net/$metadata#indexers/$entity\",\"@odata.etag\":\"\\\"0x8D76B42CAC5DAEE\\\"\",\"name\":\"indexer\",\"description\":null,\"dataSourceName\":\"azs-java-test-sql\",\"skillsetName\":\"ocr-skillset\",\"targetIndexName\":\"indexforindexers\",\"disabled\":null,\"schedule\":{\"interval\":\"P1D\",\"startTime\":\"0001-01-01T00:00:00Z\"},\"parameters\":null,\"fieldMappings\":[],\"outputFieldMappings\":[]}", | ||
"Preference-Applied" : "odata.include-annotations=\"*\"", | ||
"Content-Type" : "application/json; odata.metadata=minimal" | ||
}, | ||
"Exception" : null | ||
} ], | ||
"variables" : [ ] | ||
} |