Skip to content

Commit

Permalink
Merge pull request #6761 from mook-as/bats/wasm/windows
Browse files Browse the repository at this point in the history
BATS/containers/wasm: Fix for Windows
  • Loading branch information
jandubois authored Apr 23, 2024
2 parents eba9527 + 5e74ce3 commit a1451de
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bats/tests/containers/wasm.bats
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ shim_version() {
@test 'verify spin shim is not installed on PATH' {
run shim_version spin v2
assert_failure
assert_output --partial "containerd-shim-spin-v2: not found"
assert_output --regexp 'containerd-shim-spin-v2.*(not found|No such file)'
}

hello() {
Expand Down Expand Up @@ -112,9 +112,13 @@ download_shim() {

local base_url="https://github.com/deislabs/containerd-wasm-shims/releases/download/v${MANUAL_VERSION}"
local filename="containerd-wasm-shims-${version}-${shim}-linux-${ARCH}.tar.gz"
local host_archive

# Since we end up using curl.exe on Windows, pass the host path to curl.
host_archive=$(host_path "${PATH_CONTAINERD_SHIMS}/${filename}")

mkdir -p "$PATH_CONTAINERD_SHIMS"
curl --silent --location --output "${PATH_CONTAINERD_SHIMS}/${filename}" "${base_url}/${filename}"
curl --location --output "$host_archive" "${base_url}/${filename}"
tar xfz "${PATH_CONTAINERD_SHIMS}/${filename}" --directory "$PATH_CONTAINERD_SHIMS"
rm "${PATH_CONTAINERD_SHIMS}/${filename}"
}
Expand All @@ -124,7 +128,7 @@ download_shim() {
download_shim wws v1

rdctl shutdown
rdctl start
launch_the_application
wait_for_container_engine
}

Expand Down

0 comments on commit a1451de

Please sign in to comment.