Skip to content

Commit

Permalink
chore(tests): source helm-git a single time (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
aslafy-z authored Jul 9, 2024
1 parent a5793c2 commit bf31d22
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions helm-git-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

set -eu

# Mark this shell
# shellcheck disable=SC2034
HELM_GIT_SOURCE=1

bin_name="helm-git"
readonly bin_name
allowed_protocols="https http file ssh"
Expand Down
6 changes: 4 additions & 2 deletions tests/test-helper.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
export HELM_GIT_DEBUG=1
export HELM_GIT_DIRNAME="$BATS_TEST_DIRNAME/.."

# shellcheck source=helm-git-plugin.sh
source "$HELM_GIT_DIRNAME/helm-git-plugin.sh"
if [ -z "$HELM_GIT_SOURCE" ]; then
# shellcheck source=helm-git-plugin.sh
source "$HELM_GIT_DIRNAME/helm-git-plugin.sh"
fi

function _run_helm_git() { run main '' '' '' "$1"; }

Expand Down

0 comments on commit bf31d22

Please sign in to comment.