Skip to content

Commit 333ec6a

Browse files
authored
Remove or fix azure* environment variables in live tests (Azure#37815)
* Remove or fix azure* environment variables in live tests * try samples against tme
1 parent ba31df5 commit 333ec6a

File tree

23 files changed

+20
-99
lines changed

23 files changed

+20
-99
lines changed

common/smoketest/test-resources.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,4 +261,4 @@
261261
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2019-06-01').keys[0].value, ';EndpointSuffix=', parameters('storageEndpointSuffix'))]"
262262
}
263263
}
264-
}
264+
}

eng/pipelines/templates/steps/build-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,11 @@ steps:
149149
condition: and(succeeded(), eq(variables['TestSamples'], 'true'))
150150
env:
151151
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
152+
# Enable samples tests that use DefaultAzureCredential to load the federated pipeline credential
153+
AZURE_POD_IDENTITY_AUTHORITY_HOST: 'https://FakeAuthorityHost'
152154
${{ insert }}: ${{ parameters.EnvVars }}
153155
inputs:
154-
azureSubscription: ${{ parameters.ServiceConnection }}
156+
azureSubscription: azure-sdk-tests-public
155157
azurePowerShellVersion: LatestVersion
156158
pwsh: true
157159
ScriptType: InlineScript

sdk/cognitivelanguage/tests.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ extends:
1818
AZURE_CONVERSATIONS_DEPLOYMENT_NAME: $(clu-project-deployment)
1919
AZURE_CONVERSATIONS_WORKFLOW_PROJECT_NAME: $(clu-workflow-project)
2020
AZURE_CONVERSATIONS_WORKFLOW_DEPLOYMENT_NAME: $(clu-workflow-project-deployment)
21-
AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id)
22-
AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret)
23-
AZURE_SUBSCRIPTION_ID: $(azure-subscription-id)
24-
AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id)
21+
AZURE_SUBSCRIPTION_ID: $(COGNITIVELANGUAGE_SUBSCRIPTION_ID)
2522
TEST_MODE: "RunLiveNoRecord" # use when allowing preparers to create the rgs for you
2623
AZURE_TEST_RUN_LIVE: 'true'
2724
AZURE_SKIP_LIVE_RECORDING: 'true'

sdk/communication/azure-communication-email/test-resources.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@
3030
"metadata": {
3131
"description": "The application client id used to run tests."
3232
}
33-
},
34-
"testApplicationSecret": {
35-
"type": "string",
36-
"metadata": {
37-
"description": "The application client secret used to run tests."
38-
}
3933
}
4034
},
4135
"variables": {
@@ -102,10 +96,6 @@
10296
"type": "string",
10397
"value": "[parameters('testApplicationId')]"
10498
},
105-
"AZURE_CLIENT_SECRET": {
106-
"type": "string",
107-
"value": "[parameters('testApplicationSecret')]"
108-
},
10999
"COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": {
110100
"type": "string",
111101
"value": "[listKeys(resourceId('Microsoft.Communication/CommunicationServices',variables('uniqueSubDomainName')), '2021-10-01-preview').primaryConnectionString]"
@@ -132,4 +122,4 @@
132122
}
133123
}
134124
}
135-
125+

sdk/communication/test-resources/test-resources-post.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
param (
1111
[hashtable] $DeploymentOutputs,
1212
[string] $TenantId,
13-
[string] $TestApplicationId,
14-
[string] $TestApplicationSecret
13+
[string] $TestApplicationId
1514
)
1615

1716
# By default stop for any error.

sdk/confidentialledger/tests.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ extends:
99
- TestSamples=.*/true
1010
MaxParallel: 1
1111
EnvVars:
12-
AZURE_SUBSCRIPTION_ID: $(provisioner-subscription)
13-
AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id)
14-
AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret)
15-
AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id)
1612
TEST_MODE: "RunLiveNoRecord" # use when allowing preparers to create the rgs for you
1713
AZURE_TEST_RUN_LIVE: "true" # use when utilizing the New-TestResources Script
18-
AZURE_SKIP_LIVE_RECORDING: 'True'
14+
AZURE_SKIP_LIVE_RECORDING: 'True'

sdk/documentintelligence/tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ extends:
1313
Public:
1414
Location: eastus
1515
EnvVars:
16-
AZURE_SUBSCRIPTION_ID: $(provisioner-subscription)
1716
TEST_MODE: 'RunLiveNoRecord'
1817
AZURE_SKIP_LIVE_RECORDING: 'True'
1918
AZURE_TEST_RUN_LIVE: 'true'

sdk/evaluation/tests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,5 @@ extends:
77
MatrixReplace:
88
- TestSamples=.*/true
99
EnvVars:
10-
AZURE_CLIENT_ID: $(EVALUATION_CLIENT_ID)
11-
AZURE_CLIENT_SECRET: $(EVALUATION_CLIENT_SECRET)
12-
AZURE_TENANT_ID: $(EVALUATION_TENANT_ID)
13-
AZURE_SUBSCRIPTION_ID: $(EVALUATION_SUBSCRIPTION_ID)
1410
TEST_MODE: 'RunLiveNoRecord' # use when allowing preparers to create the rgs for you
1511
AZURE_TEST_RUN_LIVE: 'true' # use when utilizing the New-TestResources Script
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
trigger: none
22

33
extemds:
4-
template: ../../../eng/pipelines/templates/stages/archetype-sdk-tests.yml
4+
template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
55
parameters:
66
ServiceDirectory: eventhub
77
BuildTargetingString: azure-mgmt-eventhub
88
EnvVars:
9-
AZURE_CLIENT_ID: $(python-eh-livetest-event-hub-aad-client-id)
10-
AZURE_TENANT_ID: $(python-eh-livetest-event-hub-aad-tenant-id)
11-
AZURE_CLIENT_SECRET: $(python-eh-livetest-event-hub-aad-secret)
12-
AZURE_SUBSCRIPTION_ID: $(python-eh-livetest-event-hub-subscription-id)
139
TEST_MODE: 'RunLiveNoRecord'
1410
AZURE_TEST_RUN_LIVE: 'true'
1511
AZURE_SKIP_LIVE_RECORDING: 'True'

sdk/formrecognizer/tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ extends:
1717
ServiceConnection: azure-sdk-tests
1818
Location: 'centraluseuap'
1919
EnvVars:
20-
AZURE_SUBSCRIPTION_ID: $(provisioner-subscription)
2120
TEST_MODE: 'RunLiveNoRecord'
2221
AZURE_SKIP_LIVE_RECORDING: 'True'
2322
AZURE_TEST_RUN_LIVE: 'true'

0 commit comments

Comments
 (0)