Skip to content

Commit 5093d29

Browse files
committed
fixing
Signed-off-by: Matt Wrock <matt@mattwrock.com>
1 parent 8d0b598 commit 5093d29

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

test/end-to-end/test_pkg_install.ps1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,20 @@ Describe "pkg install" {
3939
}
4040
}
4141

42+
if ($IsLinux) {
43+
It "installs interpreter from builder for install hooks using --auth token with a non-root user" {
44+
Remove-Item /hab/pkgs/core/busybox-static -Recurse -force
45+
Remove-Item "/hab/cache/artifacts/core-busybox-static-*" -ErrorAction Ignore
46+
$token = $env:HAB_AUTH_TOKEN
47+
$env:HAB_AUTH_TOKEN = $null
48+
$cached = Get-Item "/hab/cache/artifacts/$env:HAB_ORIGIN-dep-pkg-1*"
49+
Write-Host (hab pkg install $cached.FullName --auth "$token" | Out-String)
50+
$env:HAB_AUTH_TOKEN = $token
51+
$LASTEXITCODE | Should -Be 0
52+
Get-Content "$(hab pkg path $env:HAB_ORIGIN/dep-pkg-1)/INSTALL_HOOK_STATUS" | Should -Be "0"
53+
}
54+
}
55+
4256
It "installs interpreter from builder for install hooks using --auth token" {
4357
$interpreter = if ($IsLinux) { "busybox-static" } else { "powershell" }
4458
hab pkg uninstall core/$interpreter

0 commit comments

Comments
 (0)