test(git-gate): shell-escaping regression tests (issue #159) #168

Merged
didericis merged 1 commits from regression/issue-159-shell-escaping into main 2026-06-03 11:00:57 -04:00
Collaborator

Closes #159.

Related file: ca6d257f30/tests/unit/test_git_gate.py

Summary

  • Adds TestShellEscaping class to tests/unit/test_git_gate.py with 6 new test methods
  • Covers all six pathological character classes (single-quote, double-quote, space, semicolon, newline, backtick) in both upstream URL and name positions
  • Validates each rendered output via sh -n to confirm syntactic correctness
  • Asserts original values are preserved verbatim via shlex.quote encoding
  • Adds sh -n smoke tests for the static pre-receive and access-hook scripts

Changes (1 commit)

  • ca6d257 test(git-gate): add shell-escaping regression tests (issue #159)
Closes #159. Related file: https://gitea.dideric.is/didericis/bot-bottle/src/commit/ca6d257f30c1102df6bff7d6370d0cc2ec9bd1a0/tests/unit/test_git_gate.py ## Summary - Adds `TestShellEscaping` class to `tests/unit/test_git_gate.py` with 6 new test methods - Covers all six pathological character classes (single-quote, double-quote, space, semicolon, newline, backtick) in both upstream URL and name positions - Validates each rendered output via `sh -n` to confirm syntactic correctness - Asserts original values are preserved verbatim via `shlex.quote` encoding - Adds `sh -n` smoke tests for the static pre-receive and access-hook scripts ## Changes (1 commit) - `ca6d257` test(git-gate): add shell-escaping regression tests (issue #159)
didericis-claude added 1 commit 2026-06-03 10:57:34 -04:00
test(git-gate): add shell-escaping regression tests (issue #159)
test / unit (pull_request) Successful in 36s
test / integration (pull_request) Successful in 44s
test / unit (push) Successful in 35s
test / integration (push) Successful in 42s
ca6d257f30
Cover all six pathological character classes (single-quote,
double-quote, space, semicolon, newline, backtick) in both
upstream URL and name positions.  Each case validates rendered
output via `sh -n` and asserts the original value is preserved
verbatim after shlex.quote encoding.  Also add `sh -n` smoke
tests for the static pre-receive and access-hook scripts.
didericis approved these changes 2026-06-03 11:00:51 -04:00
didericis merged commit ca6d257f30 into main 2026-06-03 11:00:57 -04:00
didericis deleted branch regression/issue-159-shell-escaping 2026-06-03 11:00:57 -04:00
Sign in to join this conversation.