Skip to content

Commit

Permalink
pr-fix: remove resource group param
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnmoreels committed Jul 12, 2024
1 parent 847139e commit 405bc48
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion build/deploy-test-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,10 @@ stages:
inlineScript: |
Install-Module -Name Az -Force -AllowClobber -SkipPublisherCheck
Install-Module -Name Pester -Force -SkipPublisherCheck
Invoke-Pester -Script "./build/templates/smoke-tests.ps1" -OutputFile "./pester.test.results.xml" -OutputFormat 'NUnitXML' -EnableExit
Invoke-Pester -Script "./build/templates/smoke-tests.ps1" -OutputFile "./pester.test.results.xml" -OutputFormat 'NUnitXML' -EnableExit
- task: PublishTestResults@2
displayName: 'Publish test results'
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: '**/pester.test.results.xml'
failTaskOnFailedTests: true
6 changes: 3 additions & 3 deletions build/templates/smoke-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ BeforeAll {

Describe 'Storage account' {
It 'Service principal can get blob container' {
Get-AzStorageContainer -ResourceGroupName $env:resourceGroupName
Get-AzStorageContainer
}
It 'Service principal can create blob container' {
$containerName = 'test-container'
try {
New-AzStorageContainer -ResourceGroupName $env:resourceGroupName -Name $containerName
New-AzStorageContainer -Name $containerName
} finally {
Remove-AzStorageContainer -ResourceGroupName $env:resourceGroupName -Name $containerName -Force
Remove-AzStorageContainer -Name $containerName -Force
}
}
}

0 comments on commit 405bc48

Please sign in to comment.