-
Notifications
You must be signed in to change notification settings - Fork 533
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
Add and fix warnings for various Helm goals #2772
base: master
Are you sure you want to change the base?
Add and fix warnings for various Helm goals #2772
Conversation
- helm-lint and helm-push: Add warning when 'helm' goal is not ran - helm: Fix warning when 'resource' goal is not ran Signed-off-by: Jurrie Overgoor <[email protected]>
Eclipse JKube CI ReportStarted new GH workflow run for #2772 (2024-03-11T18:28:22Z) ⚙️ JKube E2E Tests (8229716200)
|
Signed-off-by: Jurrie Overgoor <[email protected]>
Signed-off-by: Jurrie Overgoor <[email protected]>
jkube-kit/parent/pom.xml
Outdated
@@ -736,6 +736,12 @@ | |||
<version>${version.mockito}</version> | |||
<scope>test</scope> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.mockito</groupId> | |||
<artifactId>mockito-inline</artifactId> |
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.
Very strange that I needed this in OpenshiftHelmPushMojoTest for the org.mockito.Mockito.mockConstruction(HelmService.class);
thingy, but HelmPushMojoTest doesn't need it...
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.
I think you can avoid this by adding mockito-inline
folder in src/test/resources
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.
Wow, I never knew! Thanks for the tip! Implemented in e463ef7.
...aven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/HelmLintMojo.java
Show resolved
Hide resolved
Signed-off-by: Jurrie Overgoor <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2772 +/- ##
=============================================
+ Coverage 59.36% 70.62% +11.26%
- Complexity 4586 5027 +441
=============================================
Files 500 486 -14
Lines 21211 19483 -1728
Branches 2830 2509 -321
=============================================
+ Hits 12591 13760 +1169
+ Misses 7370 4494 -2876
+ Partials 1250 1229 -21 ☔ View full report in Codecov by Sentry. |
Why have you deleted these tests? Were they breaking due to this refactor? |
Yes, due to the new check in HelmServiceUtil. This check results in no exception being thrown. The way I look at the deleted unit tests is that they were made after the code was made. It more or less just models what the code was doing, instead of what the intent was. I don't see why an exception should be thrown when there are no source files. And if there is a reason for it, why wasn't a dedicated exception, with explanatory name and proper description string used? But I could be wrong here! If the tests served a purpose, please describe that purpose and I'll see what I can do to put the tests back. |
Signed-off-by: Jurrie Overgoor <[email protected]>
Quality Gate passedIssues Measures |
@Jurrie : There is a minor conflict. Could you please address it whenever you revisit this PR? |
Hi Jurrie, thanks for looking into this. This is fine but it will need to be immediately refactored if merged as is. One approach can be to provide the necessary variables such as the kind of plugin (Maven or Gradle) and applicable name of the goal/task ( |
Description
Add and fix warnings for various Helm goals
Type of change
test, version modification, documentation, etc.)
Checklist