jenkinsci / jenkinsci/support-core-plugin
[JENKINS-54920] Refactor AboutJenkins class
- 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
allan_burdajewicz
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
Assessment
This issue has not been assessed yet.