ci+chore(mod_whp_symlink): remove racy WHPSymlinkWalk prototype; run the probe test in CI; assert Options All mapping
shared-httpd mod_whp_symlink PR check / Symlink-Module-Probe (pull_request) Successful in 1m15s
shared-httpd mod_whp_symlink PR check / Symlink-Module-Probe (pull_request) Successful in 1m15s
- Remove the WHPSymlinkWalk post-walk lstat prototype (check-then-use race by construction; WHPOwnerGuard is the race-free mechanism): hook, directive, per-dir member, header docs. The directive is now an unknown command. - Probe test: WHP_SYMTEST_REQUIRE=1 turns every SKIP into a FAIL (no docker, no image, container does not start) and a minimum assertion count is enforced. New assertions: bare `Options All` keeps Apache semantics (Indexes on, MultiViews off, same-owner symlink followed, cross-tenant refused) plus None/+MultiViews controls (106 assertions). - CI: new pull_request workflow shared-httpd-symlink-pr.yaml (builds amd64 locally, no push/secrets, runs the probe test); build-push.yaml Build-Shared-httpd runs the probe test against the amd64 digest it just pushed, before the arm64 build and tag assembly, so a failure publishes no tag. Test script added to the shellcheck set; wiring tests added. - docs/shared-httpd-symlink-module.md: behaviour, local run, CI. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
This commit is contained in:
1 parent
1953a176f5
commit
0d9e57e012
7 files changed
+161
-62
No files matched your search
@@ -177,6 +177,31 @@ class Wiring(unittest.TestCase):
|
||||
self.assertIn("default: 'false'", m.group(1))
|
||||
self.assertIn('type: string', m.group(1))
|
||||
|
||||
def test_symlink_probe_gates_shared_httpd_publish(self):
|
||||
job = self.jobs['Build-Shared-httpd']
|
||||
names = [n for n, _ in steps(job)]
|
||||
g = [i for i, n in enumerate(names) if n.startswith('Probe test (mod_whp_symlink')]
|
||||
self.assertEqual(len(g), 1)
|
||||
self.assertLess(names.index([n for n in names if n.startswith('Build amd64')][0]), g[0])
|
||||
self.assertLess(g[0], names.index([n for n in names if n.startswith('Build arm64')][0]))
|
||||
self.assertLess(g[0], names.index([n for n in names if n.startswith('Assemble')][0]))
|
||||
st = step(job, 'Probe test (mod_whp_symlink')
|
||||
self.assertNotIn('continue-on-error', st)
|
||||
self.assertNotIn('if:', st)
|
||||
self.assertIn('${{ steps.amd64.outputs.digest }}', st)
|
||||
self.assertIn('set -euo pipefail', st)
|
||||
self.assertIn('WHP_SYMTEST_REQUIRE=1 ./scripts/tests/whp-symlink-module.test.sh', st)
|
||||
|
||||
def test_symlink_pr_workflow(self):
|
||||
with open(os.path.join(ROOT, '.gitea', 'workflows', 'shared-httpd-symlink-pr.yaml')) as f:
|
||||
t = f.read()
|
||||
self.assertRegex(t, r'(?m)^on:\n pull_request:\n paths:')
|
||||
self.assertNotIn('docker push', t)
|
||||
self.assertNotIn('secrets.', t)
|
||||
self.assertIn('WHP_SYMTEST_REQUIRE=1 ./scripts/tests/whp-symlink-module.test.sh', t)
|
||||
self.assertLess(t.index('apt-get update && apt-get install'), t.index('shellcheck -S warning'))
|
||||
self.assertNotIn('continue-on-error', t)
|
||||
|
||||
def test_tag_scheme_unchanged(self):
|
||||
"""Run the assemble step's shell with a recording stub: exact tags per version."""
|
||||
for j, (repo, _, matrix) in SLICE.items():
|
||||
|
||||
Reference in new issue
Block a user