From 27b85bd6832577983e1c5dc2f6396679a8fe2dcb Mon Sep 17 00:00:00 2001 From: Nic Manoogian Date: Tue, 13 Feb 2024 17:25:58 -0500 Subject: [PATCH] chore: replace md5 with sha in tests --- tests/e2e/install-sh-update-in-place.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/e2e/install-sh-update-in-place.sh b/tests/e2e/install-sh-update-in-place.sh index de0c7b73..b148ebf3 100755 --- a/tests/e2e/install-sh-update-in-place.sh +++ b/tests/e2e/install-sh-update-in-place.sh @@ -59,8 +59,8 @@ afterAll() { fi } -md5hash() { - md5 -rq $1 || md5sum $1 | awk '{print $1}' +filehash() { + sha256sum "$1" | awk '{print $1}' } ###################################################################### @@ -132,12 +132,12 @@ set +e mkdir "$TEMP_INSTALL_DIR" touch "$TEMP_INSTALL_DIR/doppler" && chmod +x "$TEMP_INSTALL_DIR/doppler" -empty_hash="$(md5hash "$TEMP_INSTALL_DIR/doppler")" +empty_hash="$(filehash "$TEMP_INSTALL_DIR/doppler")" output="$("$DOPPLER_SCRIPTS_DIR/install.sh" --no-package-manager 2>&1)" exit_code=$? set -e -updated_hash="$(md5hash "$TEMP_INSTALL_DIR/doppler")" +updated_hash="$(filehash "$TEMP_INSTALL_DIR/doppler")" installed_at="$(command -v doppler || true)" actual_dir="$(dirname "$installed_at")"