Skip to content

Fix the test fixtures failing to unzip - #113

Merged
hannesa2 merged 2 commits into
masterfrom
fix-fixture-symlinks
Sep 29, 2026
Merged

hannesa2 merged 2 commits into
masterfrom
fix-fixture-symlinks

Conversation

@goneng

@goneng goneng commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Make the test fixtures extractable again, so the specs run against real repositories instead of failing at setup.

  • Remove the 66 absolute symlinks under repo-with-submodule/.git/modules/** from fixtures.zip. They point into /Applications/GitHub.app/... (git template hooks, description, info/exclude), and ZipArchive 2.6.0 aborts the whole extraction on any symlink escaping the destination.
  • Stop caching clean_repository when the unzip fails, so a partial extraction is no longer reused as a valid fixture cache.

Follow-up to #109; unblocks #80. Two failures remain that are unrelated to the fixtures:

  • Libgit2FeaturesSpec (3): libgit2 is built without SSH.
  • GTSubmoduleSpec "should synchronize the remote URL": libgit2 1.x git_submodule_sync writes the resolved absolute URL instead of ../Test_App.

Test plan

  • xcodebuild -workspace ObjectiveGitFramework.xcworkspace -scheme "ObjectiveGit Mac" test ARCHS=x86_64 with a cleared fixture cache: 287 tests, 4 failures (the ones listed above), no unzip errors. Master: 1340 failures, almost all from the aborted unzip.
  • Extracted the new archive: 0 symlinks, zip -T OK, and git status / git submodule status in repo-with-submodule are identical to the original archive.

🤖 Generated with Claude Code

goneng and others added 2 commits September 29, 2026 20:30
ZipArchive refuses to extract a symlink that points outside the
destination and aborts the whole archive, so no fixture repository was
ever created and nearly every spec failed.

- Drop the 66 symlinks under repo-with-submodule/.git/modules/**. They
  are git template files (sample hooks, description, info/exclude) that
  point into /Applications/GitHub.app, which no machine has anymore.
- Git needs none of them; the submodule state the specs check is
  unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed extraction left a partial clean_repository behind, which every
later spec reused as if it were complete, so the unzip was never
retried and the real error only surfaced once.

- Remove clean_repository when the unzip fails, so the next spec tries
  again and reports the actual cause.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@goneng goneng closed this Sep 29, 2026
@goneng
goneng deleted the fix-fixture-symlinks branch September 29, 2026 18:09
@goneng
goneng restored the fix-fixture-symlinks branch September 29, 2026 18:51
@goneng goneng reopened this Sep 29, 2026
@hannesa2
hannesa2 merged commit d015a03 into master Sep 29, 2026
6 checks passed
@hannesa2
hannesa2 deleted the fix-fixture-symlinks branch September 29, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants