Skip to content

Commit

Permalink
fix install tests
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Goodman <[email protected]>
  • Loading branch information
wagoodman committed Nov 14, 2024
1 parent 9d58015 commit 47e2c73
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion test/install/3_install_asset_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ test_positive_snapshot_install_asset() {
arch="amd64_v1"
fi

# note: this is a change made in goreleaser v1.62.0
local_suffix=""
if [ "${arch}" == "arm64" ]; then
local_suffix="_v8.0"
fi

assertFilesEqual \
"$(snapshot_dir)/${os}-build_${os}_${arch}/${binary}" \
"$(snapshot_dir)/${os}-build_${os}_${arch}${local_suffix}/${binary}" \
"${expected_path}" \
"unable to verify installation of os=${os} arch=${arch} format=${format}"

Expand Down
2 changes: 1 addition & 1 deletion test/install/environments/Dockerfile-alpine-3.6
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM alpine:3.6
RUN apk update && apk add python3 wget curl unzip make ca-certificates
RUN apk update && apk add python3 wget curl unzip make ca-certificates jq
RUN curl -O -L "https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-amd64" && \
mv cosign-linux-amd64 /usr/local/bin/cosign && \
chmod +x /usr/local/bin/cosign
2 changes: 1 addition & 1 deletion test/install/environments/Dockerfile-ubuntu-20.04
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM --platform=linux/amd64 ubuntu:20.04@sha256:33a5cc25d22c45900796a1aca487ad7a7cb09f09ea00b779e3b2026b4fc2faba
RUN apt update -y && apt install make python3 curl unzip -y
RUN apt update -y && apt install make python3 curl unzip jq -y
RUN LATEST_VERSION=$(curl https://api.github.com/repos/sigstore/cosign/releases/latest | grep tag_name | cut -d : -f2 | tr -d "v\", ") && \
curl -O -L "https://github.com/sigstore/cosign/releases/latest/download/cosign_${LATEST_VERSION}_amd64.deb" && \
dpkg -i cosign_${LATEST_VERSION}_amd64.deb

0 comments on commit 47e2c73

Please sign in to comment.