Skip to content

Commit

Permalink
chore: lake: fix noRelease test when lean repo is tagged
Browse files Browse the repository at this point in the history
  • Loading branch information
tydeu authored and kim-em committed May 21, 2024
1 parent 7834f02 commit 873ef2d
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/lake/tests/noRelease/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 873ef2d

Please sign in to comment.