Skip to content

Commit

Permalink
test-image: Handle fingerprint collisions
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Aug 13, 2023
1 parent a9b6151 commit d5fef78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/test-image
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ trap cleanup EXIT HUP INT TERM
echo "==> Fetching the image"
curl "${META_URL}" -s -o "/tmp/${TEST_IMAGE}/meta"
curl "${DATA_URL}" -s -o "/tmp/${TEST_IMAGE}/root"
FINGERPRINT=$(cat "/tmp/${TEST_IMAGE}/meta" "/tmp/${TEST_IMAGE}/root" | sha256sum | cut -d' ' -f1)
lxc image delete "${FINGERPRINT}" 2>/dev/null || true
lxc image import "/tmp/${TEST_IMAGE}/meta" "/tmp/${TEST_IMAGE}/root" --alias "${TEST_IMAGE}"

echo "==> Creating the instances"
Expand Down

0 comments on commit d5fef78

Please sign in to comment.