Skip to content

Commit

Permalink
Add space dir tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
  • Loading branch information
jkroepke committed Aug 8, 2024
1 parent c8c6771 commit ffeb974
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/unit/template.bats
Original file line number Diff line number Diff line change
Expand Up @@ -416,17 +416,17 @@ key2: value" 2>&1
@test "template: helm template w/ chart + secrets.yaml + space path" {
SPACE_DIR="${TEST_TEMP_DIR}/plugin dir"
mkdir "${SPACE_DIR}"

VALUES="assets/values/${HELM_SECRETS_BACKEND}/secrets.yaml"
VALUES_PATH="${TEST_TEMP_DIR}/${VALUES}"

create_chart "${TEST_TEMP_DIR}"

run env HELM_PLUGINS="${SPACE_DIR}" "${HELM_BIN}" plugin install "$(_winpath "${GIT_ROOT}")"
run env HELM_PLUGINS="${SPACE_DIR}" WSLENV="HELM_PLUGINS:${WSLENV}" "${HELM_BIN}" plugin install "$(_winpath "${GIT_ROOT}")"

assert_success

run env HELM_PLUGINS="${SPACE_DIR}" "${HELM_BIN}" secrets template "${TEST_TEMP_DIR}/chart" -f "${VALUES_PATH}" 2>&1
run env HELM_PLUGINS="${SPACE_DIR}" WSLENV="HELM_PLUGINS:${WSLENV}" "${HELM_BIN}" --debug secrets template "${TEST_TEMP_DIR}/chart" -f "${VALUES_PATH}" 2>&1

assert_output -e "\[helm-secrets\] Decrypt: .*${VALUES}"
assert_output --partial "port: 81"
Expand All @@ -435,7 +435,7 @@ key2: value" 2>&1
assert_file_not_exists "${VALUES_PATH}.dec"
}

@test "template: helm template w/ chart + invalid yaml" {
@test "template: helm template w/ chart + invalid yaml" {
if [[ "${VALS_BIN}" = *".exe" ]]; then
skip "Unix path w/ vals.exe"
fi
Expand Down

0 comments on commit ffeb974

Please sign in to comment.