Skip to content

Commit

Permalink
chore: green up 2.x branch after rebase (#1708)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed May 7, 2024
1 parent 2aaed9d commit cc6922a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
13 changes: 12 additions & 1 deletion e2e/npm_translate_lock_auth/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,18 @@ else
_sedi 's#npmrc = "//:.npmrc",#use_home_npmrc = True,#' WORKSPACE
fi

bazel run "$BZLMOD_FLAG" @npm//:sync
# Trigger the update of the pnpm lockfile which should exit non-zero
if bazel run "$BZLMOD_FLAG" @npm//:sync; then
echo "ERROR: expected 'update_pnpm_lock' to exit with non-zero exit code on update"
exit 1
fi

# The lockfile has been updated and sync should now exit 0
if ! bazel run "$BZLMOD_FLAG" @npm//:sync; then
echo "ERROR: expected 'update_pnpm_lock' to exit zero once the lockfile is up to date"
exit 1
fi

export ASPECT_RULES_JS_FROZEN_PNPM_LOCK=1

bazel test "$BZLMOD_FLAG" //...
6 changes: 3 additions & 3 deletions e2e/update_pnpm_lock/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ASPECT_RULES_JS_DISABLE_UPDATE_PNPM_LOCK=
# Have to make another change to package.json to invalidate the repository rule
_sedi 's#"@types/node": "16"#"@types/node": "14"#' package.json

# Trigger the update of the pnpm lockfile which should fail
# Trigger the update of the pnpm lockfile which should exit non-zero
if bazel run "$BZLMOD_FLAG" @npm//:sync; then
echo "ERROR: expected 'update_pnpm_lock' to exit with non-zero exit code on update"
exit 1
Expand All @@ -74,9 +74,9 @@ if [ -z "$diff" ]; then
exit 1
fi

# The lockfile has been updated and sync should now succeed
# The lockfile has been updated and sync should now exit 0
if ! bazel run "$BZLMOD_FLAG" @npm//:sync; then
echo "ERROR: expected 'update_pnpm_lock' to succeed once the lockfile is up to date"
echo "ERROR: expected 'update_pnpm_lock' to exit zero once the lockfile is up to date"
exit 1
fi

Expand Down
6 changes: 3 additions & 3 deletions e2e/update_pnpm_lock_with_import/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ASPECT_RULES_JS_FROZEN_PNPM_LOCK=

print_step "It should update the lockfile after a running the invalide target with ASPECT_RULES_JS_FROZEN_PNPM_LOCK unset"

# Trigger the update of the pnpm lockfile which should fail
# Trigger the update of the pnpm lockfile which should exit non-zero
if bazel run "$BZLMOD_FLAG" @npm//:sync; then
echo "ERROR: expected 'update_pnpm_lock' to exit with non-zero exit code on update"
exit 1
Expand All @@ -69,9 +69,9 @@ if [ -z "$diff" ]; then
exit 1
fi

# The lockfile has been updated and sync should now succeed
# The lockfile has been updated and sync should now exit 0
if ! bazel run "$BZLMOD_FLAG" @npm//:sync; then
echo "ERROR: expected 'update_pnpm_lock' to succeed once the lockfile is up to date"
echo "ERROR: expected 'update_pnpm_lock' to exit zero once the lockfile is up to date"
exit 1
fi

Expand Down

0 comments on commit cc6922a

Please sign in to comment.