Skip to content

Commit

Permalink
test: add check for clean git status before unlocking crypt
Browse files Browse the repository at this point in the history
  • Loading branch information
maxisam committed Nov 13, 2024
1 parent f5bc804 commit 713c7d5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/linux/basic-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,14 @@ cd "$PWD"
# clean git changes
git reset --hard

git status
echo "current path: $PWD"

git crypt unlock "./tests/key.gitcrypt"
git status | grep -q "nothing to commit" || {
echo "git status is not clean"
exit 1
}

git crypt unlock "$PWD/tests/key.gitcrypt"
# check if tests/fake.test.secrets is decrypted

if xxd "./tests/fake.test.secrets" | grep -q 'GITCRYPT'; then
Expand Down

0 comments on commit 713c7d5

Please sign in to comment.