From 05a4190251f9afbafd78fed1d07085932d00f66c Mon Sep 17 00:00:00 2001 From: Mac Malone Date: Tue, 21 May 2024 15:07:48 -0400 Subject: [PATCH] chore: lake: fix `noRelease` test when lean repo is tagged --- src/lake/tests/noRelease/test.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/lake/tests/noRelease/test.sh b/src/lake/tests/noRelease/test.sh index 44732c146d7d..bbef5ac68ab1 100755 --- a/src/lake/tests/noRelease/test.sh +++ b/src/lake/tests/noRelease/test.sh @@ -9,6 +9,18 @@ LAKE=${LAKE:-../../.lake/build/bin/lake} # Test Lake's behavior when failing to fetch a cloud release # --- +# Since committing a Git repository to a Git repository is not well-supported, +# We reinitialize the bar repository on each test. This requires updating the +# locked manifest to the new hash to ensure things work properly. +pushd dep +git init +git checkout -b master +git config user.name test +git config user.email test@example.com +git add --all +git commit -m "initial commit" +popd + # Test that a direct invocation fo `lake build *:release` fails ($LAKE build dep:release && exit 1 || true) | diff -u --strip-trailing-cr <(cat << 'EOF' ✖ [1/1] Fetching dep:release @@ -29,20 +41,8 @@ Build completed successfully. EOF ) - -# Since committing a Git repository to a Git repository is not well-supported, -# We reinitialize the bar repository on each test. This requires updating the -# locked manifest to the new hash to ensure things work properly. -pushd dep -git init -git checkout -b master -git config user.name test -git config user.email test@example.com -git add --all -git commit -m "initial commit" -git tag release -popd - # Test download failure +git -C dep tag release ($LAKE build dep:release && exit 1 || true) | grep --color "downloading" # Test unpacking