From d799eb2dec3a176bffb02e0cc61c8407641ee3f9 Mon Sep 17 00:00:00 2001 From: Ashique Saidalavi Date: Wed, 4 Dec 2024 17:44:25 +0530 Subject: [PATCH] Fixed the windows pipelines Signed-off-by: Ashique Saidalavi --- habitat/tests/test.ps1 | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/habitat/tests/test.ps1 b/habitat/tests/test.ps1 index 18b23be..2c66943 100644 --- a/habitat/tests/test.ps1 +++ b/habitat/tests/test.ps1 @@ -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" }