Skip to content

Commit

Permalink
Add TestMode setting
Browse files Browse the repository at this point in the history
  • Loading branch information
benbp committed Nov 19, 2020
1 parent d839cf3 commit 534876f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion eng/pipelines/templates/jobs/archetype-sdk-tests-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ jobs:
value: ''
- name: ArmTemplateParameters
value: '@{}'
- name: TestMode
value: 'None'

timeoutInMinutes: ${{ parameters.TimeoutInMinutes }}

Expand All @@ -76,6 +78,13 @@ jobs:
SubscriptionConfiguration: ${{ parameters.CloudConfig.SubscriptionConfiguration }}
ArmTemplateParameters: $(ArmTemplateParameters)

- pwsh: |
if ($env:SupportsRecording -and $env:Record) {
Write-Host "Enabling Record mode"
Write-Host "##vso[task.setvariable variable=TestMode]Record"
}
displayName: Set Test Mode
- pwsh: >
dotnet test eng/service.proj
--framework $(TestTargetFramework)
Expand All @@ -92,7 +101,7 @@ jobs:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_MULTILEVEL_LOOKUP: 0
AZURE_TEST_MODE: "${{ coalesce(variables['TestMode'], 'None') }}"
AZURE_TEST_MODE: $(TestMode)
${{ each var in parameters.EnvVars }}:
${{ var.key }}: ${{ var.value }}
Expand Down
1 change: 1 addition & 0 deletions eng/pipelines/templates/stages/archetype-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ parameters:
Windows_NetCore:
OSVmImage: "windows-2019"
TestTargetFramework: netcoreapp2.1
SupportsRecording: true
Windows_NetCore_ProjectRefAzureClients:
OSVmImage: "windows-2019"
TestTargetFramework: netcoreapp2.1
Expand Down

0 comments on commit 534876f

Please sign in to comment.