Skip to content

Commit

Permalink
Test (integration): Standardize test names
Browse files Browse the repository at this point in the history
  • Loading branch information
joeltimothyoh committed Jun 1, 2024
1 parent ec7f89c commit 8b1d554
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,67 +16,67 @@ Describe "PSRepositoryReleaseManager" -Tag 'Integration' {
"Generate notes content:" | Write-Verbose
Get-Content -Path "$stdout" | Write-Host
}
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF (HEAD)" {
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF='HEAD'" {
$env:RELEASE_TAG_REF = 'HEAD'

$stdout = ../src/scripts/ci/Invoke-Generate.ps1
"Generate notes content:" | Write-Verbose
Get-Content -Path "$stdout" | Write-Host
}
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF (branch)" {
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF='branch'" {
$env:RELEASE_TAG_REF = 'master'
git checkout -b 'master' 'HEAD'

$stdout = ../src/scripts/ci/Invoke-Generate.ps1
"Generate notes content:" | Write-Verbose
Get-Content -Path "$stdout" | Write-Host
}
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF (release tag)" {
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF='vx.x.x'" {
$env:RELEASE_TAG_REF = git describe --tags --abbrev=0

$stdout = ../src/scripts/ci/Invoke-Generate.ps1
"Generate notes content:" | Write-Verbose
Get-Content -Path "$stdout" | Write-Host
}
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF (remote branch)" {
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF='remote/branch'" {
$env:RELEASE_TAG_REF = 'origin/master'

$stdout = ../src/scripts/ci/Invoke-Generate.ps1
"Generate notes content:" | Write-Verbose
Get-Content -Path "$stdout" | Write-Host
}
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF (commit hash)" {
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF='commit-hash'" {
$env:RELEASE_TAG_REF = git rev-parse HEAD

$stdout = ../src/scripts/ci/Invoke-Generate.ps1
"Generate notes content:" | Write-Verbose
Get-Content -Path "$stdout" | Write-Host
}
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF `$env:RELEASE_NOTES_VARIANT" {
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF='HEAD' `$env:RELEASE_NOTES_VARIANT='Changes-HashSubject-NoMerges'" {
$env:RELEASE_TAG_REF = 'HEAD'
$env:RELEASE_NOTES_VARIANT = 'Changes-HashSubject-NoMerges'

$stdout = ../src/scripts/ci/Invoke-Generate.ps1
"Generate notes content:" | Write-Verbose
Get-Content -Path "$stdout" | Write-Host
}
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF `$env:RELEASE_NOTES_PATH (full)" {
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF='HEAD' `$env:RELEASE_NOTES_PATH='/path/to/.release-notes.md'" {
$env:RELEASE_TAG_REF = 'HEAD'
$env:RELEASE_NOTES_PATH = "$(git rev-parse --show-toplevel)/.release-notes.fullpath.md"

$stdout = ../src/scripts/ci/Invoke-Generate.ps1
"Generate notes content:" | Write-Verbose
Get-Content -Path "$stdout" | Write-Host
}
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF `$env:RELEASE_NOTES_PATH (relative)" {
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF='HEAD' `$env:RELEASE_NOTES_PATH='.release-notes.md'" {
$env:RELEASE_TAG_REF = 'HEAD'
$env:RELEASE_NOTES_PATH = ".release-notes.relativepath.md"

$stdout = ../src/scripts/ci/Invoke-Generate.ps1
"Generate notes content:" | Write-Verbose
Get-Content -Path "$stdout" | Write-Host
}
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF `$env:RELEASE_NOTES_VARIANT `$env:RELEASE_NOTES_PATH (all variants)" {
It "Runs Invoke-Generate.ps1 with `$env:PROJECT_DIRECTORY `$env:RELEASE_TAG_REF='HEAD' `$env:RELEASE_NOTES_VARIANT `$env:RELEASE_NOTES_PATH (all variants)" {
$env:RELEASE_TAG_REF = 'HEAD'
$ReleaseNotesVariant = Get-ChildItem "../src/PSRepositoryReleaseManager/generate/variants" | % { $_.BaseName }
"Release notes variants:" | Write-Verbose
Expand Down

0 comments on commit 8b1d554

Please sign in to comment.