Skip to content

Clearly mark test constructors in CA classes or move them out of the production code #12713

@scholzj

Description

@scholzj

All the Ca classes (Ca, ClientsCa, ClusterCa) and to some extend also the new CaConfig class have various constructors. Some of them are for tests only. But it is not clearly denominated as we probably need to keep them as public given the variety of places they are used from. I think that could get some improving …

  • Maybe something simple such as improving the Javadoc comments to clearly state they are used for tests only
  • But maybe we could also consider having some static creator methods in some test utils class to abstract the test defaults and keep these constructors away from the production code.

(Based on observation during #12680 review, briefly discussed in https://cloud-native.slack.com/archives/C018247K8T0/p1777983551564739)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions