-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test (integration): Utilize Pester for integration tests
- Loading branch information
1 parent
5a78377
commit 3825663
Showing
3 changed files
with
30 additions
and
61 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/PSRepositoryReleaseManager/PSRepositoryReleaseManager.Tests.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Describe "PSRepositoryReleaseManager" -Tag 'Integration' { | ||
BeforeAll { | ||
$ErrorActionPreference = 'Continue' | ||
$ErrorView = 'NormalView' | ||
$VerbosePreference = 'Continue' | ||
$env:RELEASE_TAG_REF = git describe --tags --abbrev=0 | ||
} | ||
BeforeEach { | ||
} | ||
AfterEach { | ||
} | ||
It "Runs Invoke-Generate.ps1 -ReleaseTagRef -ReleaseNotesVariant -ReleaseNotesPath" { | ||
$ReleaseNotesVariant = Get-ChildItem "../src/PSRepositoryReleaseManager/generate/variants" | % { $_.BaseName } | ||
"Release notes variants:" | Write-Verbose | ||
$ReleaseNotesVariant | Write-Host | ||
|
||
foreach ($variant in $ReleaseNotesVariant) { | ||
$env:RELEASE_NOTES_VARIANT = $variant | ||
$env:RELEASE_NOTES_PATH = "$(git rev-parse --show-toplevel)/.release-notes.$variant.md" | ||
|
||
$stdout = ../src/scripts/ci/Invoke-Generate.ps1 -ReleaseTagRef $env:RELEASE_TAG_REF -ReleaseNotesVariant $env:RELEASE_NOTES_VARIANT -ReleaseNotesPath $env:RELEASE_NOTES_PATH | ||
"Generate notes content:" | Write-Verbose | ||
Get-Content -Path "$stdout" | Out-String -Stream | % { $_.Trim() } | ? { $_ } | Write-Host | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters