jenkinsci / jenkinsci/support-core-plugin

[JENKINS-54920] Refactor AboutJenkins class

Open
#802 1 comment 0 reactions 0 assignees View on GitHub
component:support-core-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
19
Forks
77
Avg merge
17h 53m
Merged PRs (30d)
3

Description

The AboutJenkins class is huge (>1000 lines) and coverage in AboutJenkinsTest consists of a single function mayBeDateSmokes.

I'm trying to improve the output of the AboutJenkins code, and potentially improve the sanitization. But in order to do that (and not be laughed at by my colleagues), I need to be able to write tests for the pieces of code I'm changing. As is, AboutJenkins isn't practically testable in small units because everything is hidden in private class or private static.

I understand that people may have pending pull requests (they should get them merged) and they may have code which depends on minute details of how this code works.

If they care, they should get their changes merged and then help write tests documenting their expectations which would make it easier for future contributors to understand the constraints the code lives with when they write changes.

---
Originally reported by jsoref, imported from: Refactor AboutJenkins class


  • assignee: allan_burdajewicz
  • status: Open
  • priority: Minor
  • component(s): support-core-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20251212-090250

Raw content of original issue

The AboutJenkins class is huge (>1000 lines) and coverage in AboutJenkinsTest consists of a single function mayBeDateSmokes.

I'm trying to improve the output of the AboutJenkins code, and potentially improve the sanitization. But in order to do that (and not be laughed at by my colleagues), I need to be able to write tests for the pieces of code I'm changing. As is, AboutJenkins isn't practically testable in small units because everything is hidden in private class or private static.

I understand that people may have pending pull requests (they should get them merged) and they may have code which depends on minute details of how this code works.

If they care, they should get their changes merged and then help write tests documenting their expectations which would make it easier for future contributors to understand the constraints the code lives with when they write changes.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.