File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments