And update API versions

Live tests run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4070243&view=results
This commit is contained in:
Deyaaeldeen Almahallawi 2024-08-21 21:22:06 -07:00 коммит произвёл GitHub
Родитель 392b001c1d
Коммит b3bc86566d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 22 добавлений и 61 удалений

Просмотреть файл

@ -2,7 +2,7 @@
To test this project, make sure to build it by following our [building instructions](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md#building), then follow the [testing instructions](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md#testing).
The Azure Cognitive Search client does not have any recorded tests and so, all the tests require an Azure Cognitive Search account to be set up beforehand. You can use existing Azure resources for the live tests, or generate new ones by using our [New-TestResources.ps1](https://github.com/Azure/azure-sdk-for-js/blob/main/eng/common/TestResources/New-TestResources.ps1) script, which will use an [ARM template](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/search/test-resources.json) that already has all of the the necessary configurations.
The Azure Cognitive Search client does not have any recorded tests and so, all the tests require an Azure Cognitive Search account to be set up beforehand. You can use existing Azure resources for the live tests, or generate new ones by using our [New-TestResources.ps1](https://github.com/Azure/azure-sdk-for-js/blob/main/eng/common/TestResources/New-TestResources.ps1) script, which will use a [Bicep template](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/search/test-resources.bicep) that already has all of the the necessary configurations.
The Azure resource that is used by the tests in this project is:

Просмотреть файл

@ -0,0 +1,21 @@
param baseName string = resourceGroup().name
param searchEndpointSuffix string = 'search.windows.net'
var apiVersion = '2024-06-01-preview'
resource searchService 'Microsoft.Search/searchServices@2024-06-01-preview' = {
name: baseName
location: resourceGroup().location
sku: {
name: 'basic'
}
properties: {
replicaCount: 1
partitionCount: 1
hostingMode: 'default'
}
}
output SEARCH_API_ADMIN_KEY string = listAdminKeys(searchService.id, apiVersion).primaryKey
output SEARCH_API_ADMIN_KEY_ALT string = listAdminKeys(searchService.id, apiVersion).secondaryKey
output ENDPOINT string = 'https://${baseName}.${searchEndpointSuffix}'

Просмотреть файл

@ -1,60 +0,0 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"baseName": {
"type": "string",
"defaultValue": "[resourceGroup().name]",
"metadata": {
"description": "The base resource name."
}
},
"searchSku": {
"type": "string",
"defaultValue": "basic",
"metadata": {
"description": "SKU for search resource. The default is 'basic'"
}
},
"searchEndpointSuffix": {
"type": "string",
"defaultValue": "search.windows.net",
"metadata": {
"description": "Endpoint suffix for the search resource. Defaults to 'search.windows.net'"
}
}
},
"variables": {},
"resources": [
{
"apiVersion": "2015-08-19",
"name": "[parameters('baseName')]",
"location": "[resourceGroup().location]",
"type": "Microsoft.Search/searchServices",
"sku": {
"name": "[parameters('searchSku')]"
},
"properties": {
"replicaCount": 1,
"partitionCount": 1,
"hostingMode": "default"
},
"tags": {},
"dependsOn": []
}
],
"outputs": {
"SEARCH_API_ADMIN_KEY": {
"type": "string",
"value": "[listAdminKeys(resourceId('Microsoft.Search/searchServices', parameters('baseName')), '2015-08-19').primaryKey]"
},
"SEARCH_API_ADMIN_KEY_ALT": {
"type": "string",
"value": "[listAdminKeys(resourceId('Microsoft.Search/searchServices', parameters('baseName')), '2015-08-19').secondaryKey]"
},
"ENDPOINT": {
"type": "string",
"value": "[concat('https://', parameters('baseName'), '.', parameters('searchEndpointSuffix'))]"
}
}
}