Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AzureDevOpsDsc: Enable integration tests #24

Merged
merged 2 commits into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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