Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <[email protected]>
  • Loading branch information
yurishkuro committed Jul 26, 2024
1 parent 32f95a1 commit 7bae809
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/compute-tags.test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash

# This script uses https://github.com/kward/shunit2 to run unit tests.
# The path to this repo must be provided via SHUNIT2 env var.

SHUNIT2="${SHUNIT2:?'expecting SHUNIT2 env var pointing to a dir with https://github.com/kward/shunit2 clone'}"

# shellcheck disable=SC2086
computeTags="$(dirname $0)/compute-tags.sh"

Expand All @@ -16,7 +21,7 @@ testRequireImageName() {
}

testRequireBranch() {
err=$(bash "$computeTags" foo/bar 2>&1)
err=$(GITHUB_SHA=sha bash "$computeTags" foo/bar 2>&1)
assertContains "$err" "$err" 'expecting BRANCH env var'
}

Expand Down Expand Up @@ -73,6 +78,5 @@ testSemVerBranch() {
expect "${expected[@]}"
}

SHUNIT2="${SHUNIT2:?'expecting SHUNIT2 env var pointing to a dir with https://github.com/kward/shunit2 clone'}"
# shellcheck disable=SC1091
source "${SHUNIT2}/shunit2"

0 comments on commit 7bae809

Please sign in to comment.