This repository was archived by the owner on Sep 9, 2026. It is now read-only.
Add tests for uncovered KSA code paths - #51
Merged
Maximilian-Nesslauer merged 1 commit intoJul 6, 2026
Merged
Maximilian-Nesslauer merged 1 commit into
Maximilian-Nesslauer merged 1 commit into
Conversation
- Cover the uncovered changed lines from the upstream PR's coverage report: game class surface and URLs, DefaultCommandLines, the StarMap launch fallback when the config cannot be written, the TOML escape branches, manifest sync via ProcessLoadedModsBeforeGameStart, version provider fallbacks, full transformer enumeration, cancelling the game selection on instance add, relative directories in AddParentDirectories, KSP2's FormatVersion, and the KSA GUI icon accessor. - Split ProcessLoadedModsBeforeGameStart into a testable internal overload taking the manifest paths; the public wrapper binds the real user-profile paths and is excluded from coverage, since tests must not write the user's real manifest.toml. - Deliberately still uncovered: MacPath and the Mac launch line (platform-gated), RefreshVersions (live network download), and the KSA.dll FileVersionInfo catch (not deterministically triggerable).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Raises patch coverage for the upstream PR (KSP-CKAN#4688, coveralls reported 78.53%). Almost entirely test code, targeting the uncovered changed lines from the coverage report: the KSA game class surface, DefaultCommandLines, the StarMap launch fallback when the config cannot be written, the TOML escape branches, the manifest sync, version detection fallbacks, transformer enumeration, cancelling the game selection on instance add, relative directories in AddParentDirectories, and the GUI icon accessor.
One production change:
ProcessLoadedModsBeforeGameStartis split into a testable internal overload taking the manifest paths (the same pattern the file already uses forAdjustCommandLineandUpdateManifestFile). The public wrapper binds the real user-profile paths and is[ExcludeFromCodeCoverage], since tests must not write the user's real manifest.toml.Deliberately still uncovered:
MacPathand the Mac launch line (platform-gated, no Mac test runner in CI),RefreshVersions(live network download, same as KSP2's), and the KSA.dllFileVersionInfocatch (not deterministically triggerable).Verification
All affected fixtures green locally on net481 and net10.0-windows (131 tests each).