Skip to content

Commit

Permalink
Replacing pwd with test file directory
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Farley <[email protected]>
  • Loading branch information
adamfarley committed Dec 17, 2024
1 parent b7efc57 commit 3a7c97a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/tests/functionLibraryTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ function infoTests(){
# checkFileSha
function checkFileShaTests(){
# Does it work when it should?
checkFileSha "${sampleFileSha}" "$(pwd)/${sampleFileName}"
checkFileSha "${sampleFileSha}" "${scriptDir}/${sampleFileName}"
testResults "checkFileShaTest 1" "$?"

# Does it fail when we have the wrong sha?
checkFileSha "12345" "$(pwd)/${sampleFileName}" &> /dev/null
checkFileSha "12345" "${scriptDir}/${sampleFileName}" &> /dev/null
[[ "$?" != "0" ]]
testResults "checkFileShaTest 2" "$?"
}
Expand All @@ -85,7 +85,7 @@ function doesThisURLExistTests(){

# downloadFile
function downloadFileTests() {
workdir="$(pwd)/tmp_test_work_dir"
workdir="${scriptDir}/tmp_test_work_dir"
# Setup
[[ -x "${workdir}" ]] && echo "Error: Temporary test work directory exists and shouldn't: ${workdir}" && exit 1
mkdir "${workdir}"
Expand Down

0 comments on commit 3a7c97a

Please sign in to comment.