Skip to content

Commit

Permalink
AzureDevOpsDsc: Enable integration tests (#24)
Browse files Browse the repository at this point in the history
- Enabled integration tests against https://dev.azure.com/azuredevopsdsc/ (see
  comment #9 (comment)
  for more information).
  • Loading branch information
johlju authored Jan 27, 2021
1 parent dee4e97 commit 48e919e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 26 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed non-terminating, integration tests ([issue #18](https://github.com/dsccommunity/AzureDevOpsDsc/issues/18))
- AzureDevOpsDsc.Common
- Added 'wrapper' functionality around the [Azure DevOps REST API](https://docs.microsoft.com/en-us/rest/api/azure/devops/)

### Changed

- Enabled integration tests against https://dev.azure.com/azuredevopsdsc/ (see
comment https://github.com/dsccommunity/AzureDevOpsDsc/issues/9#issuecomment-766375424
for more information).
49 changes: 23 additions & 26 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,34 +191,31 @@ stages:
script: 'winrm quickconfig -quiet'
pwsh: false

# TODO: Current disabled due to integration tests throws the exception:
# "Cannot validate argument on parameter 'Pat'. The " Test-AzDevOpsPat -Pat $_ -IsValid " validation script for the argument with value "$(AzureDevOps.Integration.Pat)" did not return a result of True. Determine why the validation script failed, and then try the command again."

# - powershell: |
# ./build.ps1 -Tasks test -CodeCoverageThreshold 0 -PesterScript @(
# 'tests/Integration/'
# )
# name: test
# displayName: 'Run Integration Tests'
# env:
# azureDevOpsIntegrationApiUri: $(AzureDevOps.Integration.ApiUri)
# azureDevOpsIntegrationPat: $(AzureDevOps.Integration.Pat)
- powershell: |
./build.ps1 -Tasks test -CodeCoverageThreshold 0 -PesterScript @(
'tests/Integration/'
)
name: test
displayName: 'Run Integration Tests'
env:
azureDevOpsIntegrationApiUri: $(AzureDevOps.Integration.ApiUri)
azureDevOpsIntegrationPat: $(AzureDevOps.Integration.Pat)
# - task: PublishTestResults@2
# displayName: 'Publish Test Results'
# condition: succeededOrFailed()
# inputs:
# testResultsFormat: 'NUnit'
# testResultsFiles: 'output/testResults/NUnit*.xml'
# testRunTitle: 'Windows Server Core (PowerShell Core) - Integration'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
condition: succeededOrFailed()
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'Windows Server Core (PowerShell Core) - Integration'

# - task: PublishCodeCoverageResults@1
# displayName: 'Publish Code Coverage'
# condition: succeededOrFailed()
# inputs:
# codeCoverageTool: 'JaCoCo'
# summaryFileLocation: 'output/testResults/CodeCov*.xml'
# pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)'
- task: PublishCodeCoverageResults@1
displayName: 'Publish Code Coverage'
condition: succeededOrFailed()
inputs:
codeCoverageTool: 'JaCoCo'
summaryFileLocation: 'output/testResults/CodeCov*.xml'
pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)'

- job: test_unit_windows_ps
condition: succeededOrFailed()
Expand Down

0 comments on commit 48e919e

Please sign in to comment.