Skip to content

Commit

Permalink
deploy: fix bug in helm-test
Browse files Browse the repository at this point in the history
This change fixes a bug w/ helm-test which caused it to not return an accurate exit code.
  • Loading branch information
whoisj committed Jan 24, 2025
1 parent ca02a8d commit 46ec194
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions deploy/Kubernetes/_build/helm-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ function test_helm_chart([string] $chart_path, [string] $tests_path, [object[]]

if ($fail_count -gt 0) {
write-minimal "Failed: ${fail_count}, Passed: ${pass_count}, Total: $($tests.count)" 'Red'
return $false
}
else
{
write-minimal "Passed: ${pass_count}, Total: $($tests.count)" 'Green'
return $true
}
}
11 changes: 10 additions & 1 deletion deploy/Kubernetes/worker/tests/trtllm/test-chart.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,11 @@ $tests = @(
}
)

$is_pass = $false

try {
test_helm_chart 'deploy/Kubernetes/worker/charts/trtllm' 'deploy/Kubernetes/worker/tests/trtllm' $tests
$is_pass = test_helm_chart 'deploy/Kubernetes/worker/charts/trtllm' 'deploy/Kubernetes/worker/tests/trtllm' $tests
write-debug "is_pass: ${is_pass}."
}
catch {
if ($is_debug) {
Expand All @@ -136,3 +139,9 @@ catch {

# Clean up any NVBUILD environment variables left behind by the build.
cleanup_after

if (-not $is_pass) {
exit(1)
}

exit(0)

0 comments on commit 46ec194

Please sign in to comment.