Skip to content

A few more tests#4426

Merged
HebaruSan merged 12 commits into
KSP-CKAN:masterfrom
HebaruSan:add/yet-more-tests
Sep 1, 2025
Merged

A few more tests#4426
HebaruSan merged 12 commits into
KSP-CKAN:masterfrom
HebaruSan:add/yet-more-tests

Conversation

@HebaruSan
Copy link
Copy Markdown
Member

@HebaruSan HebaruSan commented Sep 1, 2025

Motivation

Coveralls says we're up to 67%, which is an improvement, but not comfortable enough to be an end state.

Changes

New tests are added for:

  • Deduplication during installation
  • ckan import
  • NameComparer
    (used only for printing mods after repo update, and required sorting them alphanumerically)
  • GUI.EmbeddedImages
  • GUI.ReleaseStatusItem
  • NetKAN.CmdLineOptions
  • NetKAN.ModuleService.GetSpaceWarpInfo
    (FYI to @JohnsterSpaceProgramOfficial, we're borrowing your BurnController-0.8.1.zip for testing, since it is MIT-licensed. We'll just be using it to confirm that we can extract and parse the swinfo.json correctly.)

More untestable code is excluded from coverage:

  • GUI.ControlFactory
  • GUI.FormCompatibility
  • GUI.WinFormsExtensions
  • GUI.GUI
  • GUI.X11

Unused code is deleted:

  • InconsistentKraken handler in CmdLine.Main
  • ServiceLocator.Container's setter
  • GUI/Properties/Settings.*

@HebaruSan HebaruSan added GUI Issues affecting the interactive GUI Cmdline Issues affecting the command line Core (ckan.dll) Issues affecting the core part of CKAN Tests Issues affecting the internal tests labels Sep 1, 2025
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 17385609546

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 3 files are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+1.6%) to 68.506%

Files with Coverage Reduction New Missed Lines %
Netkan/Services/ModuleService.cs 1 55.22%
Cmdline/Action/Update.cs 3 54.11%
Totals Coverage Status
Change from base Build 17363592026: 1.6%
Covered Lines: 10339
Relevant Lines: 14786

💛 - Coveralls

@HebaruSan
Copy link
Copy Markdown
Member Author

HebaruSan commented Sep 1, 2025

Coverage Status

Nice! 🎉

@HebaruSan HebaruSan merged commit 2aea1b1 into KSP-CKAN:master Sep 1, 2025
6 checks passed
@HebaruSan HebaruSan deleted the add/yet-more-tests branch September 1, 2025 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Cmdline Issues affecting the command line Core (ckan.dll) Issues affecting the core part of CKAN GUI Issues affecting the interactive GUI Tests Issues affecting the internal tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants