Skip to content

Add E2E integration tests#36

Merged
albertodebortoli merged 3 commits intomainfrom
e2e-tests
Mar 10, 2026
Merged

Add E2E integration tests#36
albertodebortoli merged 3 commits intomainfrom
e2e-tests

Conversation

@albertodebortoli
Copy link
Member

Pull Request Title

Add E2E integration tests

Description

  • Adds end-to-end integration tests that exercise real state transitions across multiple components (Installer, Uninstaller, Unlinker, LinkedToolsLister) in full lifecycle scenarios.
  • Unit tests cover 98.4% line coverage but no test composed multiple components together through a full install → unlink/uninstall → reinstall cycle. These E2E tests fill that gap.
  • Uses LinkedToolsLister as the primary verification oracle, mirroring what luca linked reports to the user.
  • Two new Lucafile fixtures with unique desiredBinaryName per tool (and bare URLs, no extension) ensure each tool produces a distinct symlink — avoiding the overwrite problem present in existing fixtures where all tools share the same binaryPath basename.

Type of Change

  • Feature
  • Bug fix
  • Maintenance / Refactor
  • Documentation
  • CI / Tooling
  • Other (specify)

How Has This Been Tested?

All 6 new E2E tests pass, and the full suite (160 tests) passes with no regressions.

swift test --filter E2ETests
swift test
  • Added / updated unit tests
  • Tested on macOS (arch: arm64)

Screenshots / Demo (if applicable)

Suite E2ETests passed after 0.043 seconds.
Test run with 160 tests in 26 suites passed after 0.139 seconds.

Checklist

  • Swift code builds locally (swift build)
  • Tests pass locally (swift test)
  • Code style / formatting respected
  • Documentation updated (README / comments)
  • Version / tag alignment considered (if release related)
  • PR title follows conventional style (optional)

CI Considerations

  • Affects build time notably
  • Requires new secrets / env vars
  • Alters release process

Breaking Changes?

  • No

Additional Notes

New files:

  • Tests/Fixtures/Lucafiles/Lucafile_e2e_full.yml — 3 tools (MockToolA 1.0.0, MockToolB 2.0.0, MockToolC 3.0.0) each with a unique desiredBinaryName
  • Tests/Fixtures/Lucafiles/Lucafile_e2e_subset.yml — MockToolB + MockToolC only, used to trigger orphan detection against MockToolA
  • Tests/E2E/E2ETests.swift — 6 tests covering: uninstall leaves broken symlink, unlink preserves cache, unlink then reinstall restores link, subset spec orphans tool, unlink one leaves others intact, uninstall then reinstall re-downloads

@albertodebortoli albertodebortoli added this to the 0.8.0 milestone Mar 10, 2026
@albertodebortoli albertodebortoli merged commit dd4741d into main Mar 10, 2026
2 checks passed
@albertodebortoli albertodebortoli deleted the e2e-tests branch March 10, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant