Skip to content

Commit

Permalink
Fixed the windows pipelines
Browse files Browse the repository at this point in the history
Signed-off-by: Ashique Saidalavi <[email protected]>
  • Loading branch information
ashiqueps committed Dec 4, 2024
1 parent 6274973 commit d799eb2
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions habitat/tests/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ param (

Write-Host "--- :fire: Smokish test"
# Pester the Package
$version=hab pkg exec "${pkg_ident}" chef-vault -v
$actual_version=[Regex]::Match($version,"([0-9]+.[0-9]+.[0-9]+)").Value
$package_version=$PackageIdentifier.split("/",4)[2]
$help_message=hab pkg exec "${pkg_ident}" -- chef-vault -h
$original_message="Usage: chef-vault"

Write-Host "package_version $package_version actual version $actual_version"
if ($package_version -eq $actual_version)
Write-Host "Checking the help message of the package"
if ($help_message -like $original_message)
{
Write "Chef-cli working fine"
Write "Chef-vault is working fine"
}
else {
Write-Error "chef-cli version not met expected $package_version actual version $actual_version "
throw "Chef cli windows pipeline not working for hab pkg"
Write-Error "chef-vault binary doesn't return the correct usage message "
throw "Chef-vault windows pipeline not working for hab pkg"
}

0 comments on commit d799eb2

Please sign in to comment.