diff --git a/sdk/formrecognizer/ai-form-recognizer/tests.yml b/sdk/formrecognizer/ai-form-recognizer/tests.yml index 6b7d993e8824..a679daea2b24 100644 --- a/sdk/formrecognizer/ai-form-recognizer/tests.yml +++ b/sdk/formrecognizer/ai-form-recognizer/tests.yml @@ -15,8 +15,12 @@ extends: parameters: PackageName: "@azure/ai-form-recognizer" ServiceDirectory: formrecognizer - Location: "${{ parameters.Location }}" - EnvVars: - AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) - AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + TimeoutInMinutes: 120 + SupportedClouds: "Public,UsGov,China" + CloudConfig: + Public: + Location: "${{ parameters.Location }}" + UsGov: + Location: "usgovvirginia" + China: + Location: "chinaeast2" diff --git a/sdk/formrecognizer/test-resources.bicep b/sdk/formrecognizer/test-resources.bicep index 1f99d323666d..b066d276078c 100644 --- a/sdk/formrecognizer/test-resources.bicep +++ b/sdk/formrecognizer/test-resources.bicep @@ -4,7 +4,7 @@ param testApplicationOid string param blobStorageAccount string = 'azuresdktrainingdata' param trainingDataContainer string = 'trainingdata-v3' param selectionMarkTrainingDataContainer string = 'selectionmark-v3' -param blobResourceId string = resourceId('2cd617ea-1866-46b1-90e3-fffb087ebf9b', 'TrainingData', 'Microsoft.Storage/storageAccounts', blobStorageAccount) +param blobResourceId string = resourceId('TrainingData', 'Microsoft.Storage/storageAccounts', blobStorageAccount) param trainingDataSasProperties object = { canonicalizedResource: '/blob/${blobStorageAccount}/${trainingDataContainer}' signedExpiry: dateTimeAdd(utcNow('u'), 'PT2H') diff --git a/sdk/servicebus/service-bus/test/public/atomManagement.spec.ts b/sdk/servicebus/service-bus/test/public/atomManagement.spec.ts index 1c2c22764113..3b3c20bd501f 100644 --- a/sdk/servicebus/service-bus/test/public/atomManagement.spec.ts +++ b/sdk/servicebus/service-bus/test/public/atomManagement.spec.ts @@ -1200,9 +1200,9 @@ serviceApiVersions.forEach((serviceVersion) => { ); should.equal( error.message.startsWith("The messaging entity") || - error.message.startsWith("Entity") || - error.message.startsWith("SubCode") || - error.message.startsWith("No service"), + error.message.startsWith("Entity") || + error.message.startsWith("SubCode") || + error.message.startsWith("No service"), true, `Unexpected error message found.`, ); @@ -1286,9 +1286,9 @@ serviceApiVersions.forEach((serviceVersion) => { should.equal(error.code, "MessageEntityNotFoundError", `Unexpected error code found.`); should.equal( error.message.startsWith("The messaging entity") || - error.message.startsWith("Entity") || - error.message.startsWith("SubCode") || - error.message.startsWith("No service"), + error.message.startsWith("Entity") || + error.message.startsWith("SubCode") || + error.message.startsWith("No service"), true, `Unexpected error message found.`, ); @@ -1310,9 +1310,9 @@ serviceApiVersions.forEach((serviceVersion) => { should.equal(error.code, "MessageEntityNotFoundError", `Unexpected error code found.`); should.equal( error.message.startsWith("The messaging entity") || - error.message.startsWith("Entity") || - error.message.startsWith("SubCode") || - error.message.startsWith("No service"), + error.message.startsWith("Entity") || + error.message.startsWith("SubCode") || + error.message.startsWith("No service"), true, `Unexpected error message found.`, ); @@ -1366,9 +1366,9 @@ serviceApiVersions.forEach((serviceVersion) => { should.equal(error.code, "MessageEntityNotFoundError", `Unexpected error code found.`); should.equal( error.message.startsWith("The messaging entity") || - error.message.startsWith("Entity") || - error.message.startsWith("SubCode") || - error.message.startsWith("No service"), + error.message.startsWith("Entity") || + error.message.startsWith("SubCode") || + error.message.startsWith("No service"), true, `Unexpected error message found.`, ); @@ -1466,61 +1466,61 @@ serviceApiVersions.forEach((serviceVersion) => { input?: CreateSubscriptionOptions; output: SubscriptionProperties; }[] = [ - { - testCaseTitle: "Undefined subscription options", - input: undefined, - output: { - autoDeleteOnIdle: "P10675199DT2H48M5.4775807S", - deadLetteringOnMessageExpiration: false, - deadLetteringOnFilterEvaluationExceptions: true, - defaultMessageTimeToLive: "P10675199DT2H48M5.4775807S", - forwardDeadLetteredMessagesTo: undefined, - enableBatchedOperations: true, - forwardTo: undefined, - userMetadata: undefined, - lockDuration: "PT1M", - maxDeliveryCount: 10, - requiresSession: false, - status: "Active", - subscriptionName: managementSubscription1, - topicName: managementTopic1, - availabilityStatus: "Available", - }, - }, - { - testCaseTitle: "all properties except forwardTo, forwardDeadLetteredMessagesTo", - input: { - lockDuration: "PT5M", - maxDeliveryCount: 20, - defaultMessageTimeToLive: "P2D", - autoDeleteOnIdle: "PT1H", - deadLetteringOnFilterEvaluationExceptions: false, - deadLetteringOnMessageExpiration: true, - enableBatchedOperations: false, - requiresSession: true, - userMetadata: "test metadata", - status: "ReceiveDisabled" as EntityStatus, - availabilityStatus: "Available" as EntityAvailabilityStatus, + { + testCaseTitle: "Undefined subscription options", + input: undefined, + output: { + autoDeleteOnIdle: "P10675199DT2H48M5.4775807S", + deadLetteringOnMessageExpiration: false, + deadLetteringOnFilterEvaluationExceptions: true, + defaultMessageTimeToLive: "P10675199DT2H48M5.4775807S", + forwardDeadLetteredMessagesTo: undefined, + enableBatchedOperations: true, + forwardTo: undefined, + userMetadata: undefined, + lockDuration: "PT1M", + maxDeliveryCount: 10, + requiresSession: false, + status: "Active", + subscriptionName: managementSubscription1, + topicName: managementTopic1, + availabilityStatus: "Available", + }, }, - output: { - lockDuration: "PT5M", - maxDeliveryCount: 20, - defaultMessageTimeToLive: "P2D", - autoDeleteOnIdle: "PT1H", - deadLetteringOnFilterEvaluationExceptions: false, - deadLetteringOnMessageExpiration: true, - enableBatchedOperations: false, - requiresSession: true, - forwardDeadLetteredMessagesTo: undefined, - forwardTo: undefined, - userMetadata: "test metadata", - status: "ReceiveDisabled", - subscriptionName: managementSubscription1, - topicName: managementTopic1, - availabilityStatus: "Available", + { + testCaseTitle: "all properties except forwardTo, forwardDeadLetteredMessagesTo", + input: { + lockDuration: "PT5M", + maxDeliveryCount: 20, + defaultMessageTimeToLive: "P2D", + autoDeleteOnIdle: "PT1H", + deadLetteringOnFilterEvaluationExceptions: false, + deadLetteringOnMessageExpiration: true, + enableBatchedOperations: false, + requiresSession: true, + userMetadata: "test metadata", + status: "ReceiveDisabled" as EntityStatus, + availabilityStatus: "Available" as EntityAvailabilityStatus, + }, + output: { + lockDuration: "PT5M", + maxDeliveryCount: 20, + defaultMessageTimeToLive: "P2D", + autoDeleteOnIdle: "PT1H", + deadLetteringOnFilterEvaluationExceptions: false, + deadLetteringOnMessageExpiration: true, + enableBatchedOperations: false, + requiresSession: true, + forwardDeadLetteredMessagesTo: undefined, + forwardTo: undefined, + userMetadata: "test metadata", + status: "ReceiveDisabled", + subscriptionName: managementSubscription1, + topicName: managementTopic1, + availabilityStatus: "Available", + }, }, - }, - ]; + ]; createSubscriptionTestCases.push({ testCaseTitle: "case-2 with defaultRuleOptions", input: { @@ -1859,104 +1859,104 @@ serviceApiVersions.forEach((serviceVersion) => { input: Omit["defaultRuleOptions"], "name"> | undefined; output: RuleProperties; }[] = [ - { - testCaseTitle: "Sql Filter rule options", - input: { - filter: { - sqlExpression: "stringValue = @stringParam AND intValue = @intParam", - sqlParameters: { "@intParam": 1, "@stringParam": "b" }, - }, - action: { sqlExpression: "SET a='b'" }, - }, - output: { - filter: { - sqlExpression: "stringValue = @stringParam AND intValue = @intParam", - sqlParameters: { "@intParam": 1, "@stringParam": "b" }, - }, - action: { - sqlExpression: "SET a='b'", - sqlParameters: undefined, + { + testCaseTitle: "Sql Filter rule options", + input: { + filter: { + sqlExpression: "stringValue = @stringParam AND intValue = @intParam", + sqlParameters: { "@intParam": 1, "@stringParam": "b" }, + }, + action: { sqlExpression: "SET a='b'" }, }, - name: managementRule1, - }, - }, - { - testCaseTitle: "Correlation Filter rule options with a single property", - input: { - filter: { - correlationId: "abcd", - applicationProperties: { - randomState: "WA", + output: { + filter: { + sqlExpression: "stringValue = @stringParam AND intValue = @intParam", + sqlParameters: { "@intParam": 1, "@stringParam": "b" }, + }, + action: { + sqlExpression: "SET a='b'", + sqlParameters: undefined, }, + name: managementRule1, }, - action: { sqlExpression: "SET sys.label='GREEN'" }, }, - output: { - filter: { - correlationId: "abcd", - contentType: undefined, - subject: undefined, - messageId: undefined, - replyTo: undefined, - replyToSessionId: undefined, - sessionId: undefined, - to: undefined, - applicationProperties: { - randomState: "WA", + { + testCaseTitle: "Correlation Filter rule options with a single property", + input: { + filter: { + correlationId: "abcd", + applicationProperties: { + randomState: "WA", + }, }, + action: { sqlExpression: "SET sys.label='GREEN'" }, }, - action: { - sqlExpression: "SET sys.label='GREEN'", - sqlParameters: undefined, - }, - name: managementRule1, - }, - }, - { - testCaseTitle: "Correlation Filter rule options with multiple properties", - input: { - filter: { - correlationId: "abcd", - applicationProperties: { - randomState: "WA", - randomCountry: "US", - randomInt: 25, - randomIntDisguisedAsDouble: 3.0, - randomDouble: 12.4, - randomBool: true, - randomDate: randomDate, + output: { + filter: { + correlationId: "abcd", + contentType: undefined, + subject: undefined, + messageId: undefined, + replyTo: undefined, + replyToSessionId: undefined, + sessionId: undefined, + to: undefined, + applicationProperties: { + randomState: "WA", + }, + }, + action: { + sqlExpression: "SET sys.label='GREEN'", + sqlParameters: undefined, }, + name: managementRule1, }, - action: { sqlExpression: "SET sys.label='GREEN'" }, }, - output: { - filter: { - correlationId: "abcd", - contentType: undefined, - subject: undefined, - messageId: undefined, - replyTo: undefined, - replyToSessionId: undefined, - sessionId: undefined, - to: undefined, - applicationProperties: { - randomState: "WA", - randomCountry: "US", - randomInt: 25, - randomIntDisguisedAsDouble: 3.0, - randomDouble: 12.4, - randomBool: true, - randomDate: randomDate, + { + testCaseTitle: "Correlation Filter rule options with multiple properties", + input: { + filter: { + correlationId: "abcd", + applicationProperties: { + randomState: "WA", + randomCountry: "US", + randomInt: 25, + randomIntDisguisedAsDouble: 3.0, + randomDouble: 12.4, + randomBool: true, + randomDate: randomDate, + }, }, + action: { sqlExpression: "SET sys.label='GREEN'" }, }, - action: { - sqlExpression: "SET sys.label='GREEN'", - sqlParameters: undefined, + output: { + filter: { + correlationId: "abcd", + contentType: undefined, + subject: undefined, + messageId: undefined, + replyTo: undefined, + replyToSessionId: undefined, + sessionId: undefined, + to: undefined, + applicationProperties: { + randomState: "WA", + randomCountry: "US", + randomInt: 25, + randomIntDisguisedAsDouble: 3.0, + randomDouble: 12.4, + randomBool: true, + randomDate: randomDate, + }, + }, + action: { + sqlExpression: "SET sys.label='GREEN'", + sqlParameters: undefined, + }, + name: managementRule1, }, - name: managementRule1, }, - }, - ]; + ]; createRuleTests.forEach((testCase) => { it(`${testCase.testCaseTitle}`, async () => { const response = await createEntity( diff --git a/sdk/textanalytics/ai-text-analytics/tests.yml b/sdk/textanalytics/ai-text-analytics/tests.yml index 3b32f4c7ba10..4948920fe86d 100644 --- a/sdk/textanalytics/ai-text-analytics/tests.yml +++ b/sdk/textanalytics/ai-text-analytics/tests.yml @@ -1,3 +1,9 @@ +parameters: + - name: Location + displayName: Location + type: string + default: centralus + trigger: none extends: @@ -5,3 +11,12 @@ extends: parameters: PackageName: "@azure/ai-text-analytics" ServiceDirectory: textanalytics + TimeoutInMinutes: 60 + SupportedClouds: 'Public,UsGov,China' + CloudConfig: + Public: + Location: "${{ parameters.Location }}" + UsGov: + Location: "usgovvirginia" + China: + Location: "chinaeast2"