Compare commits
2 commits
56b4cf010f
...
97664d7256
| Author | SHA1 | Date | |
|---|---|---|---|
| 97664d7256 | |||
| 3965a4fc9c |
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ echo "=== pre-commit hook tests ==="
|
|||
# Test 1: blocks live-format Forgejo token
|
||||
echo "Test 1: blocks FORGEJO_API_TOKEN=<hex>"
|
||||
REPO=$(setup_temp_repo)
|
||||
echo 'FORGEJO_API_TOKEN=YOUR_FORGEJO_TOKEN_HERE' > "$REPO/test.env"
|
||||
echo 'FORGEJO_API_TOKEN=4ea4353b88d6388e8fafab9eb36662226f3a06b0' > "$REPO/test.env"
|
||||
git -C "$REPO" add test.env
|
||||
RESULT=$(cd "$REPO" && bash "$HOOKS_DIR/pre-commit" 2>&1; echo "EXIT:$?")
|
||||
if echo "$RESULT" | grep -q "EXIT:1"; then pass "blocked FORGEJO_API_TOKEN"; else fail "should have blocked FORGEJO_API_TOKEN"; fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue