Skip to content

Commit

Permalink
add exception test
Browse files Browse the repository at this point in the history
  • Loading branch information
james-garriss committed Jan 17, 2025
1 parent 28dfeb5 commit c0ec264
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Testing/workflow/Build-SignRelease.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
# The purpose of this test to ensure that the function properly signs the module.

Describe "Bad Inputs Check" {
It "Bad key vault URL should be handled gracefully" {
It "The root folder name should exist" {
$ScriptPath = Join-Path -Path $PSScriptRoot -ChildPath '../../utils/workflow/Build-SignRelease.ps1' -Resolve
# Source the function
. $ScriptPath
$RootFolderPath = Join-Path -Path $PSScriptRoot -Childpath '../..' -Resolve
Write-Warning "Root Folder Path: $RootFolderPath"
# $RootFolderPath = Join-Path -Path $PSScriptRoot -Childpath '../..' -Resolve
# Write-Warning "Root Folder Path: $RootFolderPath"
# Copy to pester $TestDrive and put in repo folder
# pass that repo folder to signature below
New-ModuleSignature `
-AzureKeyVaultUrl "https://www.cisa.gov" `
-CertificateName "certificate name" `
-ReleaseVersion "0.0.1" `
-RootFolderName $RootFolderPath
-RootFolderName "nonexistantfoldername" | Should -Throw
}
}

0 comments on commit c0ec264

Please sign in to comment.