Skip to content

Commit

Permalink
Adds in test for misisng root (#33)
Browse files Browse the repository at this point in the history
* Add tests for missing root
  • Loading branch information
Cyb3r-Jak3 authored Apr 17, 2022
1 parent 9b2d514 commit de72a9e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/action-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ jobs:
css: true
continue-on-error: true

- name: Check Bad Root
id: bad-root
uses: ./
with:
root: /tmp/missing
log_level: INFO
css: true
continue-on-error: true

- uses: actions/upload-artifact@v3
with:
name: log
Expand All @@ -93,3 +102,4 @@ jobs:
CONFIG_OUT: ${{ steps.config.outputs.result }}
BLACKLIST_OUT: ${{ steps.blacklist.outputs.result }}
EMPTY_OUT: ${{ steps.empty.outputs.result }}
BAD_ROOT_OUT: ${{ steps.bad-root.outputs.result }}
7 changes: 6 additions & 1 deletion tests/output_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@ fi
if [[ "$EMPTY_OUT" != "no config file or root path given" ]]; then
echo "Empty check failed"
exit 1;
fi
fi

if [[ "$BAD_ROOT_OUT" -ne 1 ]]; then
echo "Bad root check failed"
exit 1;
fi

0 comments on commit de72a9e

Please sign in to comment.