Skip to content

Commit

Permalink
💚 bash5 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jcaillon committed Feb 1, 2025
1 parent fed1fea commit e250900
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/self-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ jobs:
chmod +x valet
./valet self test -C
# # Runs tests with bash 5
# - name: Run valet self test on bash5
# run: |
# chmod +x valet
# docker run --rm \
# -v $PWD:/app \
# -w /app \
# -e VALET_CONFIG_ENABLE_COLORS=true \
# noyacode/minideb-bash5.0 \
# ./valet self test -C
# Runs tests with bash 5
- name: Run valet self test on bash5
run: |
chmod +x valet
docker run --rm \
-v $PWD:/app \
-w /app \
-e VALET_CONFIG_ENABLE_COLORS=true \
noyacode/minideb-bash5.0 \
./valet self test -C
4 changes: 2 additions & 2 deletions commands.d/self-test-utils
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function selfTestUtils_compareWithApproved() {
if ${command} 1>&2; then
log::success "→ test suite has passed."
if [[ -f "${receivedFile}" ]]; then
rm -f "${receivedFile}" 1>/dev/null
rm -f "${receivedFile}" 1>/dev/null || :
fi
return 0
else
Expand All @@ -133,7 +133,7 @@ function selfTestUtils_compareWithApproved() {
chmod "${GLOBAL_TEST_REPORT_FILE_MODE}" "${approvedFile}"
fi
if [[ -f "${receivedFile}" ]]; then
rm -f "${receivedFile}" 1>/dev/null
rm -f "${receivedFile}" 1>/dev/null || :
fi
else
cp -f "${receivedFileToCopy}" "${receivedFile}"
Expand Down
2 changes: 1 addition & 1 deletion commands.d/self-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ function selfTest_runSingleTest() {

# reset the temporary location (to have consistency when using fs::createTempDirectory for example)
if [[ -d ${GLOBAL_TEST_BASE_TEMPORARY_DIRECTORY} ]]; then
rm -Rf "${GLOBAL_TEST_BASE_TEMPORARY_DIRECTORY}"
rm -Rf "${GLOBAL_TEST_BASE_TEMPORARY_DIRECTORY}" || :
fi
fs::setupTempFileGlobalVariable
fs::cleanTempFiles
Expand Down
2 changes: 1 addition & 1 deletion libraries.d/core
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ function core::reloadUserCommands() {
# ```
function core::deleteUserCommands() {
core::getUserDirectory
rm -f "${RETURNED_VALUE}/commands"
rm -f "${RETURNED_VALUE}/commands" || :
}

# ## core::getVersion
Expand Down
1 change: 1 addition & 0 deletions libraries.d/lib-bash
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ function bash::runInParallel() {
if [[ -z ${pid} ]]; then
continue
fi
log::warning "pid=${pid}, xx=${jobIndexFromPid[${pid}]:-x}, jobIndexFromPid: ${!jobIndexFromPid[*]}, , jobIndexFromPid: ${jobIndexFromPid[*]}"
jobIndex="${jobIndexFromPid[${pid}]}"
jobName="${jobNames[jobIndex]}"

Expand Down

0 comments on commit e250900

Please sign in to comment.