diff --git a/.gitignore b/.gitignore index 345258fe84db..187c44b6dc91 100644 --- a/.gitignore +++ b/.gitignore @@ -112,6 +112,7 @@ warnings.txt # API Test outputs .apitest +.assets *.js *.d.ts diff --git a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/assets.json b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/assets.json new file mode 100644 index 000000000000..bd20cc736173 --- /dev/null +++ b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "", + "TagPrefix": "apitest/appconfiguration/dataplane", + "Tag": "apitest/appconfiguration/dataplane_7a9e215e2e" +} diff --git a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/basic.yaml b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/basic.yaml new file mode 100644 index 000000000000..9e5115e267fc --- /dev/null +++ b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/basic.yaml @@ -0,0 +1,42 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/documentation/api-scenario/references/v1.2/schema.json +scope: ./liveness.yaml + +authentication: + type: AADToken + scope: https://azconfig.io/.default + +variables: + key: + type: string + prefix: key + +scenarios: + - steps: + - step: PutKeyValue + exampleFile: ../examples/PutKeyValue.json + - step: PutLock + exampleFile: ../examples/PutLock.json + - step: GetKeys + exampleFile: ../examples/GetKeys.json + - step: CheckKeys + exampleFile: ../examples/CheckKeys.json + - step: GetKeyValues + exampleFile: ../examples/GetKeyValues.json + - step: CheckKeyValues + exampleFile: ../examples/CheckKeyValues.json + - step: DeleteKeyValue + exampleFile: ../examples/DeleteKeyValue.json + - step: GetKeyValue + exampleFile: ../examples/GetKeyValue.json + - step: CheckKeyValue + exampleFile: ../examples/CheckKeyValue.json + - step: GetLabels + exampleFile: ../examples/GetLabels.json + - step: CheckLabels + exampleFile: ../examples/CheckLabels.json + - step: DeleteLock + exampleFile: ../examples/DeleteLock.json + - step: GetRevisions + exampleFile: ../examples/GetRevisions.json + - step: CheckRevisions + exampleFile: ../examples/CheckRevisions.json diff --git a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/liveness.yaml b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/liveness.yaml new file mode 100644 index 000000000000..142a5660ce7c --- /dev/null +++ b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/liveness.yaml @@ -0,0 +1,50 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/documentation/api-scenario/references/v1.2/schema.json + +scope: ResourceGroup +variables: + configStoreName: + type: string + prefix: configstor + +prepareSteps: + - step: Operations_CheckNameAvailability + operationId: Operations_CheckNameAvailability + readmeTag: ../../../../../resource-manager/readme.md + parameters: + checkNameAvailabilityParameters: + name: $(configStoreName) + type: Microsoft.AppConfiguration/configurationStores + - step: ConfigurationStores_Create + operationId: ConfigurationStores_Create + readmeTag: ../../../../../resource-manager/readme.md + parameters: + configStoreCreationParameters: + location: $(location) + sku: + name: Standard + tags: + myTag: myTagValue + - step: ConfigurationStores_Get + operationId: ConfigurationStores_Get + readmeTag: ../../../../../resource-manager/readme.md + outputVariables: + endpoint: + type: string + fromResponse: /properties/endpoint + configStoreId: + type: string + fromResponse: /id + - step: assignRole + roleAssignment: + scope: $(configStoreId) + principalId: $(object_id) + principalType: ServicePrincipal + roleName: App Configuration Data Owner + +scenarios: + - scenario: liveness + authentication: + type: AADToken + scope: https://azconfig.io/.default + steps: + - operationId: CheckKeys \ No newline at end of file diff --git a/specification/appconfiguration/data-plane/readme.test.md b/specification/appconfiguration/data-plane/readme.test.md new file mode 100644 index 000000000000..a48b651c2825 --- /dev/null +++ b/specification/appconfiguration/data-plane/readme.test.md @@ -0,0 +1,8 @@ +### Tag: package-1-0 + +These settings apply only when `--tag=package-1-0` is specified on the command line. + +``` yaml $(tag) == 'package-1-0' +test-resources: + - Microsoft.AppConfiguration/stable/1.0/scenarios/basic.yaml +``` diff --git a/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/assets.json b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/assets.json new file mode 100644 index 000000000000..fb150f11c35d --- /dev/null +++ b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "", + "TagPrefix": "apitest/appconfiguration/management", + "Tag": "apitest/appconfiguration/management_164ac7ad8e" +} diff --git a/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/basic.yaml b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/basic.yaml new file mode 100644 index 000000000000..82d85002140b --- /dev/null +++ b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/basic.yaml @@ -0,0 +1,117 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/documentation/api-scenario/references/v1.2/schema.json +scope: ResourceGroup +variables: + configStoreName: + type: string + prefix: configstor + privateEndpointConnectionName: + type: string + prefix: privateend + keyValueName: + type: string + prefix: keyvaluena + groupName: configurationStores + +prepareSteps: + - step: createVirtualNetwork + operationId: VirtualNetworks_CreateOrUpdate + readmeTag: ../../../../../../network/resource-manager/readme.md + parameters: + virtualNetworkName: $(configStoreName)-vnet + parameters: + location: $(location) + properties: + addressSpace: + addressPrefixes: + - 10.0.0.0/16 + subnets: + - name: subnet-1 + properties: + addressPrefix: 10.0.0.0/24 + outputVariables: + subnetId: + type: string + fromResponse: /properties/subnets/0/id + + - step: createPublicIPAddress + operationId: PublicIPAddresses_CreateOrUpdate + readmeTag: ../../../../../../network/resource-manager/readme.md + parameters: + publicIpAddressName: $(configStoreName)-ip + parameters: + location: $(location) + +scenarios: + - steps: + - step: Operations_List + operationId: Operations_List + - step: Operations_CheckNameAvailability + exampleFile: ../examples/CheckNameAvailable.json + - step: Operations_RegionalCheckNameAvailability + exampleFile: ../examples/RegionalCheckNameAvailable.json + - step: ConfigurationStores_Create + exampleFile: ../examples/ConfigurationStoresCreate.json + outputVariables: + configurationStoreId: + type: string + fromResponse: /id + - step: ConfigurationStores_List + exampleFile: ../examples/ConfigurationStoresList.json + - step: ConfigurationStores_ListByResourceGroup + exampleFile: ../examples/ConfigurationStoresListByResourceGroup.json + - step: ConfigurationStores_ListDeleted + exampleFile: ../examples/DeletedConfigurationStoresList.json + - step: ConfigurationStores_Get + exampleFile: ../examples/ConfigurationStoresGet.json + - step: ConfigurationStores_Update + exampleFile: ../examples/ConfigurationStoresUpdate.json + - step: ConfigurationStores_ListKeys + exampleFile: ../examples/ConfigurationStoresListKeys.json + outputVariables: + keyId: + fromResponse: /value/0/id + - step: ConfigurationStores_RegenerateKey + exampleFile: ../examples/ConfigurationStoresRegenerateKey.json + requestUpdate: + - replace: /regenerateKeyParameters/id + value: $(keyId) + - step: KeyValues_CreateOrUpdate + exampleFile: ../examples/ConfigurationStoresCreateKeyValue.json + - step: KeyValues_Get + exampleFile: ../examples/ConfigurationStoresGetKeyValue.json + - step: createPrivateEndpoints + operationId: PrivateEndpoints_CreateOrUpdate + readmeTag: ../../../../../../network/resource-manager/readme.md + parameters: + privateEndpointName: $(privateEndpointConnectionName)-endpoint + parameters: + location: $(location) + properties: + subnet: + id: $(subnetId) + privateLinkServiceConnections: + - name: $(privateEndpointConnectionName) + properties: + privateLinkServiceId: $(configurationStoreId) + groupIds: + - $(groupName) + - step: PrivateEndpointConnections_Update + exampleFile: ../examples/ConfigurationStoresCreatePrivateEndpointConnection.json + - step: PrivateEndpointConnections_ListByConfigurationStore + exampleFile: ../examples/ConfigurationStoresListPrivateEndpointConnections.json + - step: PrivateEndpointConnections_Get + exampleFile: ../examples/ConfigurationStoresGetPrivateEndpointConnection.json + - step: PrivateLinkResources_ListByConfigurationStore + exampleFile: ../examples/PrivateLinkResourcesListByConfigurationStore.json + - step: PrivateLinkResources_Get + exampleFile: ../examples/PrivateLinkResourceGet.json + - step: PrivateEndpointConnections_Delete + exampleFile: ../examples/ConfigurationStoresDeletePrivateEndpointConnection.json + - step: KeyValues_Delete + exampleFile: ../examples/ConfigurationStoresDeleteKeyValue.json + - step: ConfigurationStores_Delete + exampleFile: ../examples/ConfigurationStoresDelete.json + - step: ConfigurationStores_GetDeleted + exampleFile: ../examples/DeletedConfigurationStoresGet.json + - step: ConfigurationStores_PurgeDeleted + exampleFile: ../examples/DeletedConfigurationStoresPurge.json diff --git a/specification/appconfiguration/resource-manager/readme.test.md b/specification/appconfiguration/resource-manager/readme.test.md new file mode 100644 index 000000000000..90a8611ba14c --- /dev/null +++ b/specification/appconfiguration/resource-manager/readme.test.md @@ -0,0 +1,9 @@ +### Tag: package-2022-05-01 + +These settings apply only when `--tag=package-2022-05-01` is specified on the command line. + +``` yaml $(tag) == 'package-2022-05-01' +test-resources: + - Microsoft.AppConfiguration/stable/2022-05-01/scenarios/basic.yaml + +```