-
Notifications
You must be signed in to change notification settings - Fork 220
fix: generate proper resource name & finalizer for group-less resources #814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
return getResourceTypeName(getResourceClass()); | ||
} | ||
|
||
static <T extends HasMetadata> String getResourceTypeName(Class<T> resourceClass) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, pls add unit test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a workaround for a fix that will be in fabric8 5.12 where it's already pretty well tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, that is kinda questionable, still our code, maybe we can copy the unit test too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But if too much effort, I'm ok to skip it.
|
||
public static String getDefaultFinalizerName(String crdName) { | ||
return crdName + FINALIZER_NAME_SUFFIX; | ||
public static String getDefaultFinalizerName(String resourceName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls add unit test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
SonarCloud Quality Gate failed. |
Fixes #812